Ⅰ. 插件描述
simple commenter pluginⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'c9s/simplecommenter'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'c9s/simplecommenter'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'c9s/simplecommenter'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/c9s/simple-commenter.vim
Ⅳ. 文档说明
SimpleCommenter
Support most file type.
Depends on 'commentstring' option
Author: Cornelius 林佑安 <cornelius.howl@gmail.com>
Date: 四 3/ 4 14:39:34 2010
Options
These options could be added to your ~/.vimrc file.
If you dont want default mapping:
let g:scomment_default_mapping = 1
If you prefer comment mark from commentstring option:
let g:prefer_commentstring = 1
Online comment mark padding:
let g:oneline_comment_padding = ' '
Block comment mark padding
let g:block_comment_padding = " "
Reselect after (un)commenting
let g:scomment_reselect = 1
Default Mappings
,c Comment
,C Uncomment
,, oneline commment toggle
Custom Mapping
Add these line to your vimrc:
map <silent> <leader>c <Plug>(do-comment)
map <silent> <leader>C <Plug>(un-comment)
map <silent> ,, <Plug>(one-line-comment)
Commands
:DoComment
:UnComment
:OneLineComment