dwarffortress.vim


Ⅰ. 插件描述

Dwarf Fortress raw file plugin for Vim

Ⅱ. 基本信息

创建日期:  2017-06-22
使用用户:  1
Github星:  1
插件作者:  James Gilles

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'kazimuth/dwarffortress-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'kazimuth/dwarffortress-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'kazimuth/dwarffortress-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/kazimuth/dwarffortress.vim

Ⅳ. 文档说明

dwarffortress.vim

A Dwarf Fortress raw file plugin for Vim. Currently only provides syntax highlighting.

Installation

Plugin ManagerInstall with...
vim-plugPlug 'kazimuth/dwarffortress.vim'
pathogengit clone https://github.com/kazimuth/dwarffortress.vim ~/.vim/bundle/dwarffortress.vim
neobundle.vimNeoBundle 'kazimuth/dwarffortress.vim'
vundlePlugin 'kazimuth/dwarffortress.vim'
dein.vimcall dein#add('kazimuth/dwarffortress.vim')
nonecopy all of the files into your ~/.vim directory

Usage

Edit a raw file with vim. It should have colors.

If it doesn't have colors and it should, see the following section.

File detection

By default, the plugin looks at the first few lines of every .txt file to see if it looks like a raw file.

If it fails, you can do :set ft=dwarffortress to force the file to be detected correctly.

Or, you can go to the end of the file, add:

 vim:ft=dwarffortress:

and reopen it.

If you don't want the plugin to guess what files are raw files, you can put:

let g:dwarffortress_guess=0

in your .vimrc.

If you want to detect all .txt files as raw files, you can put:

let g:dwarffortress_always=1

in your .vimrc.

When you open a new raw file the highlighting might look a little wonky; just save and reopen it to fix that.

Other information

See :help dwarffortress.

添加新评论