Ⅰ. 插件描述
KISS Commenting for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'joshhartigan/simplecommenter-red'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'joshhartigan/simplecommenter-red'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'joshhartigan/simplecommenter-red'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/joshhartigan/simplecommenter
Ⅳ. 文档说明
### SimpleCommenter
KISS Commenting for Vim
SimpleCommenter is precisely what its name suggests - a simpler, smaller, and
more primitive alternative to the other commentary plugins available for Vim.
SimpleCommenter aims to be:
- Non-intrusive - only there when you need it.
- Respectful of your workflow - xkcd.com/1172/
- Simply functional - 'it just works'
Installation
via Vundle / vim-plug (recommended):
Plugin "joshhartigan/SimpleCommenter"via Pathogen:
cd ~/.vim/bundle && \
git clone https://github.com/joshhartigan/SimpleCommenterKey Mappings
SimpleCommenter doesn't have a default keymapping for commenting or
uncommenting lines, so that it doesn't conflict with any keymappings that you
might already have configured.
However, this is not a big disadvantage, because setting a keymapping for the
plugin's functionality is very simple.
" mapping for SimpleCommenter - comment out line
nmap <KEY> :SimpleComment<cr>
" insert mode mapping
imap <KEY> <esc>:SimpleComment<cr>i
" mapping for SimpleCommenter - uncomment line
nmap <KEY> :SimpleUncomment<cr>
" insert mode mapping
imap <KEY> <esc>:SimpleUncomment<cr>iLanguage Support
SimpleCommenter currently supports the following languages by default:
- Java
- C++
- JavaScript
- C
- Go
- Python
- Bash / Shell
- Haskell
- Lua
- Clojure
- Lisp
- Ruby
- CoffeeScript
- Scheme
In the future, support for adding your own languages will be implemented.