vim-commentary


Ⅰ. 插件描述

Comment some stuff

Ⅱ. 基本信息

创建日期:  2015-02-12
使用用户:  8
Github星:  0
插件作者:  Christian Brabandt

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'chrisbra/vim-commentary'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'chrisbra/vim-commentary'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'chrisbra/vim-commentary'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/chrisbra/vim-commentary

Ⅳ. 文档说明

# commentary.vim

initial Version

This is based on the vim-commentary
plugin from Tim Pope.

This one is more advanced and toggles comments if they do not have a trailing space.
As no one was interested in this functionality (issues #3, #32, #33 and #40)
I forked Tim Popes version and leave it here.

Description

Comment stuff out. Use gcc to comment out a line (takes a count),
gc to comment out the target of a motion (for example, gcap to
comment out a paragraph), gc in visual mode to comment out the selection,
and gc in operator pending mode to target a comment. You can also use
it as a command, either with a range like :7,17Commentary, or as part of a
:global invocation like with :g/TODO/Commentary. That's it.

Oh, and it uncomments, too. The above maps actually toggle, and gcgc
uncomments a set of adjacent commented lines.

Installation

If you don't have a preferred installation method, I recommend
installing pathogen.vim, and
then simply copy and paste:

cd ~/.vim/bundle
git clone git://github.com/chrisbra/vim-commentary.git

Once help tags have been generated, you can view the manual with
:help commentary.

FAQ

My favorite file type isn't supported!

Relax! You just have to adjust 'commentstring':

autocmd FileType apache set commentstring=#\ %s

Self-Promotion

Like commentary.vim? Follow the repository on
GitHub

License

See :help license.

添加新评论