Ⅰ. 插件描述
A simple VIM plugin to help you pretty print your data.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'sareyko/neat-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'sareyko/neat-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'sareyko/neat-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/sareyko/neat.vim
Ⅳ. 文档说明
# neat.vim
A simple VIM plugin to help you pretty print your data.

Usage
Just call :Neat to make your current buffer neater. Ranges work as well.
Want to invoke the neatness function of another filetype? Use :Neat <ft>.
Extending neat.vim
To create neatness for your filetypes, add an autoloadable file neat/<ft>.vim
and define a global variable with the name g:neat#<ft>#commands in there. This
variable has to be a list of command strings to be executed on a temporary
buffer provided by neat.vim.
Example
To create a simple definition for files of type xml, createautoload/neat/xml.vim with the following contents:
let neat#xml#commands = [ '%s/></>\r</ge', '%normal ==' ]