Ⅰ. 插件描述
Dwarf Fortress raw file plugin for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用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 Manager | Install with... |
|---|---|
| vim-plug | Plug 'kazimuth/dwarffortress.vim' |
| pathogen | git clone https://github.com/kazimuth/dwarffortress.vim ~/.vim/bundle/dwarffortress.vim |
| neobundle.vim | NeoBundle 'kazimuth/dwarffortress.vim' |
| vundle | Plugin 'kazimuth/dwarffortress.vim' |
| dein.vim | call dein#add('kazimuth/dwarffortress.vim') |
| none | copy 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=0in your .vimrc.
If you want to detect all .txt files as raw files, you can put:
let g:dwarffortress_always=1in 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.