vim-better-comments


Ⅰ. 插件描述

Easily highlight human-friendly comments in your code!

Ⅱ. 基本信息

创建日期:  2018-05-29
使用用户:  8
Github星:  68
插件作者:  Javier Blanco Gutiérrez

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-better-comments

BetterComments extension will help you create more human-friendly comments in your code.
I've borrowed the core idea from the Visual Studio plugin with the same name.

Configuration

You can tweak the behavior of BetterComments by setting a few variables in your vimrc file.

Colors

Change colors to your preferences by tweaking the provided highlight groups:

ErrorBetterComments
HighlightBetterComments
QuestionBetterComments
StrikeoutBetterComments
TodoBetterComments

Target languages

Syntax files authors usually prepend highlight groups with the name of the target language. BetterComments tries to expand those comment highlight groups definitions to detect meaningful matches. In some cases like, for example pangloss/vim-javascript, that naming convention is not followed. In such cases, you can overcome the mismatch providing a dictionary of aliases:

let g:bettercomments_language_aliases = { 'javascript': 'js' }

By default, all languages are targeted. You can change that behaviour by providing either a g:bettercomments_skipped list or a g:bettercomments_included list.

Bugs

Please report any bugs you may find on the GitHub issue tracker.

Contributing

Think you can make BetterComments better? Great!, contributions are always welcome.

Fork the project on GitHub and send a pull request.

License

BetterComments is licensed under the MIT license.
See http://opensource.org/licenses/MIT

Happy hacking!

添加新评论