Posted by Ross Wan on 三月 7, 2009
如果不习惯于“老老实实”地一行一行添加注释符的话,可以试下 EnhancedCommentify 这个 Vim 的插件。它对支持目前大多数文件格式的注释,如 PHP、Python、Java、C/C++ 等等。
下载地址
执行 :call EnhancedCommentify(‘yes’,'comment’) 即对当前行进行注释;反之,执行 :call EnhancedCommentify(‘yes’,'decomment’) 则对当前行进行反注释。
为了使用方便,可以对上面的命令进行键盘映射:
" 设置注释 map <F2> <Esc><Esc>:call EnhancedCommentify('yes','comment')<CR> " 取消注释 map <F3> <Esc><Esc>:call EnhancedCommentify('yes','decomment')<CR>
具体的使用方法,可以查看插件里面的 doc。
Have fun :)
This entry was posted on 三月 7, 2009 在 12:04 下午 and is filed under gVim. Tagged: comment, EnhancedCommentify, usage, vim. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, 或 trackback from your own site.
名字
E-mail (will not be published)
网址
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Notify me of follow-up comments via email.
Vim: EnhancedCommentify,一个好用的注释插件
Posted by Ross Wan on 三月 7, 2009
如果不习惯于“老老实实”地一行一行添加注释符的话,可以试下 EnhancedCommentify 这个 Vim 的插件。它对支持目前大多数文件格式的注释,如 PHP、Python、Java、C/C++ 等等。
下载地址
执行 :call EnhancedCommentify(‘yes’,'comment’) 即对当前行进行注释;反之,执行 :call EnhancedCommentify(‘yes’,'decomment’) 则对当前行进行反注释。
为了使用方便,可以对上面的命令进行键盘映射:
" 设置注释 map <F2> <Esc><Esc>:call EnhancedCommentify('yes','comment')<CR> " 取消注释 map <F3> <Esc><Esc>:call EnhancedCommentify('yes','decomment')<CR>具体的使用方法,可以查看插件里面的 doc。
Have fun :)
This entry was posted on 三月 7, 2009 在 12:04 下午 and is filed under gVim. Tagged: comment, EnhancedCommentify, usage, vim. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, 或 trackback from your own site.