博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
玩转vim之vim插件-cvim
阅读量:6689 次
发布时间:2019-06-25

本文共 1823 字,大约阅读时间需要 6 分钟。

玩转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

你可能感兴趣的文章
Android File Hierarchy : System Structure Architecture Layout
查看>>
腾讯2014年实习生招聘笔试面试经历
查看>>
把Jar文件转成exe安装文件
查看>>
不浮躁,获取充实感
查看>>
Pyqt 国际化多语言支持
查看>>
大多数女生为什么不适合当程序员?
查看>>
SID1190471 / 烦人的幻灯片 暴力出奇迹 !!!!!!!!!!!!!!!!!!...
查看>>
android开发-c++代码调用so库
查看>>
对Verilog 初学者比较有用的整理(转自它处)
查看>>
高速排序 与 随机高速排序 算法分析
查看>>
使用MyEclipse 2014构建Maven项目的两种方法
查看>>
WebGIS中以version方式实现代码更新后前端自动读取更新代码的方法
查看>>
删除LINUX更新后多余的内核
查看>>
Centos 安装Apache软件
查看>>
微信小程序中在swiper-item中遍历循环添加多个数据内容(微信小程序交流群:604788754)...
查看>>
Nginx配置
查看>>
家居环境监測系统设计(PC上位机版)(手机APP版待定)
查看>>
java-mybaits-00503-延迟加载
查看>>
看淡你的权力
查看>>
Linux学习(一)
查看>>