Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'gokcehan/yacom'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'gokcehan/yacom'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'gokcehan/yacom'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/gokcehan/vim-yacom
Ⅳ. 文档说明
Introduction
(Y)et (A)nother (COM)ment is a vim commenting plugin with an extremely
minimalist approach. It has only one keybind (default <leader>c) to toggle
the comment (i.e. comment if not commented, uncomment otherwise) the current
line (normal mode) or the selected line(s) (visual mode).
Installation
Drop yacom.vim to your ~/.vim/plugin folder or just use your favorite
install method.
Settings
You can change the default keybinding using:
let g:yacom_comment_toggle='<C-c>'
I haven't written a documentation for this.
Supported Languages
I have only added the languages that I use. You may want to add your own
language and optionally send me a patch (think of it as an educational
exercise if you haven't send a patch before). It should be easy since there is
only one file in the plugin and you'll know where to add your language when
you open it (try to keep it sorted).
Alternative
If you need a feature rich alternative, you may try
tcomment. It's awesome, I'm also
using it.
FQA (Frequently Questioned Answers)
I wanted to maintain a comment plugin so that it would be easy to add support
for a new language in case I want to try out an exotic language.
Exotic languages are already supported by most comment plugins these days.
Plus it is easy enough to patch existing plugins for new languages.
What if I create my own language?
That's not gonna happen.
It doesn't have fancy regexp replace algorithms meaning no bugs at all.
Every program that is longer than a few lines have some bugs within, the
question is how often you'll face them.
But it's lightweight.
Lightweight is just a fancy word for redundant startups.
Shut up!
m'kay