Ⅰ. 插件描述
A vim plugin for fixing comma placements on lists.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'benmills/vim-commadown'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'benmills/vim-commadown'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'benmills/vim-commadown'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/benmills/vim-commadown
Ⅳ. 文档说明
# Whoa, whoa, whoa. Comma down.
Comma down is a vim plugin that allows you to select a block of text and make sure each line has a comma at the end but the last. This is useful when you sort a long list and want to make sure all the commas are in the right places.
Usage
If you're in visual mode and enter command mode your prompt should include '<,'> which allows any function you call access to the selected text. Just use call CommaDown() and the selected will be fixed.
Example
If you select this text:
one
two,
three,
four,And run :'<,'>call Commadown() you will get:
one,
two,
three,
fourAcknowledgements
Ali Aghareza for telling me to calm down so much.