vim-commentor


Ⅰ. 插件描述

Toggling comments became easier!

Ⅱ. 基本信息

创建日期:  2017-05-16
使用用户:  10
Github星:  28
插件作者:  Manas Thakur

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Vim-Commentor

Toggling comments became easy! Use vim-commentor to toggle comments in any filetype with ease.
Vim-Commentor provides a comment operator that comments out a linewise motion in normal mode, as well as the selected text in visual mode.

Vim-Commentor borrows ideas from the famous commentary plugin by Tim Pope.
It is different from the same because it comments out a line at the beginning, instead of at indented locations, and also comments blank lines, thus solving issues such as this and this.

Features

  • The comment-leader is automatically derived from the commentstring. Thus, the correct comment-leader is inserted automatically for all the filetypes recognized by Vim.
  • The comment mappings are repeatable using the dot (.) operator.

Usage

  • To (un)comment a single line: gcc
  • To (un)comment selected text: gc
  • To comment out a motion: gc<motion>. For example:

    • gcj will toggle comment over the current line and the next
    • gc2k will toggle comment over the current line and two lines above
    • gcip will comment out inside the current paragraph, and so on.

Please see the documentation for more details.

Installation

Use your favorite plugin-manager, or install manually.
Refer this article
for general help on managing plugins in Vim.

Star this repository on GitHub if you like the plugin.
Feel free to send bricks and bouquets to manasthakur17@gmail.com.

License

MIT

添加新评论