玩转vim之vim插件-cvim

玩转vimvim插件-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)

转载于:https://www.cnblogs.com/shaoguangleo/archive/2011/11/09/2806060.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值