您的位置:首页 > 其它

玩转vim之vim插件-cvim

2015-03-20 15:55 155 查看

玩转vim之vim插件-cvim

使用c-support 插件加速代码开发

安装

安装下载cvim.zip解压到~/.vim即可。

配置

安装完后,可在~/.vimrc 添加快捷键映射(如我上面的配置文件中示,下面这两个快 捷键是用于快速定位错误的): " csupport plugin map <silent> <F9> <Esc>:cprevious<CR> map <silent> <F10> <Esc>:cnext<CR> 然后我们更新一下帮助文档: :helptags $VIMRUNTIME/doc :helptags ~/.vim/doc

常用 c-support 热键 (hotkey )

全部hotkey可用 evince ~/.vim/c-support/doc/c-hotkeys.pdf 打开查看。 insert mode, (n) normal mode, (v) visual mode

Comments 注释(c开头)

l \cl 添加 end-of-line 注释 (n,v,i) l \cj 调整end-of-line 注释 (n,v,i) l \cs 设置end-of-line 注释的列数 (n) l \c* 用/* */注释掉一个代码块code ⇒ comment /* */ (n,v) l \cc 用//注释掉一个代码块code ⇒ comment // (n,v) l \co 取消注释 comment ⇒ code (n,v) l \cfr frame comment (n,i) l \cfu function comment (n,i) l \cfdh file description (header) (n,i) l \chs H–file sections (tab compl.) (n,i) l \ckc keyword comment (tab compl.) (n,i) l \csc special comment (tab compl.) (n,i) l \cd Date (n,v,i) l \ct date & time (n,v,i)

Preprocessor 预处理指令(p开头)

l \ps choose a Std. Lib. Include (n,i) l \pc choose a C99 include (n,i) l \p< #include<...> (n,i) l \p" #include"..." (n,i) l \pd #define (n,i) l \pu #undef (n,i) l \pie #if #else #endif (n,v,i) l \pid #ifdef #else #endif (n,v,i) l \pin #ifndef #else #endif (n,v,i) l \pind #ifndef #def #endif (n,v,i) l \pe #error (n,i) l \pl #line (n,i)

Idioms (i开头)

l \if Function (n,v,i) l \isf static function (n,v,i) l \im Main() (n,v,i) l \ie enum + typedef (n,v,i) l \is struct + typedef (n,v,i) l \iu union + typedef (n,v,i) l \ip Printf() (n,i) l \isc Scanf() (n,i)

Run 运行编译(r开头)

l \rc save and compile (n,i) l \rl Link (n,i) l \rr Run (n,i) l \ra set comand line arguments (n,i) l \rm run make (n,i) l \rma cmd. line arg. for make (n,i) l \rp run splint1 1 (n,i) l \rpa cmd. line arg. for splint (n,i) l \rd run indent (n,i)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: