我认为创建一个将当前行或视觉选择行转换为注释标题的映射会很方便.
像这样的东西:
This is the description of the usage of the class
Run Code Online (Sandbox Code Playgroud)
按下快捷方式后会变成:
/*----------------------------------------------------*/
/* This is the description of the usage of the class */
/*----------------------------------------------------*/
Run Code Online (Sandbox Code Playgroud)
我在我的这条线上~/.vimrc完全符合你的要求:
nnoremap <leader>g I/* <Esc>A */<Esc>yyp0llv$r-$hc$*/<Esc>yykPjj
Run Code Online (Sandbox Code Playgroud)
将光标放在一条线上,按<leader>g,完成.
默认<leader>是\,这样就可以了\g.
显然,您可以使用任何您想要的快捷方式.
| 归档时间: |
|
| 查看次数: |
153 次 |
| 最近记录: |