Vim Plugins for C/C++ developers

27 篇文章 0 订阅
19 篇文章 0 订阅

原文链接:http://www.fortystones.com/vim-plugins-c-cplusplus-developer/

Following up on my previous post on Essential Vim Plugins for Web Developers, I have decided to tell you about the awesomeness of the C / C++ plugin for Vim in this article.

Now to get things going, let’s start by thinking what are the basic stuffs that you would be carrying out as a C / C++ developer? Include header files, some functions, loops, conditional statements and a main function. These are some repetitive boring tasks that you would rather have someone else do it for you. Well, that’s what c.vim plugin is all about.

For example, after installing this plugin, when you open a C or C++ file, you would get something like:

To make necessary changes in the above fields, modify the values in ~/.vim/c-support/templates/Templates file. (Installation at the end of the article)

Now you would want to insert some header files. All you need to do is type these commands in either normal mode or insert mode of vim.

Similarly, to include loop structures, all you have to do is type these commands in normal or insert mode of vim.


If you want to make your program, a well-documented and a readable one, then take my advice, use c.vim plugin. You can add a frame comment, a class description, function description etc.
For e.g. if you type \cfu in visual or insert mode, it will give you


This is one of the interesting parts of c.vim plugin. For instance, type \ii (in normal or insert mode) and witness the change.



You can now compile and run your program without quitting Vim. You don’t need to go back to the terminal, compile and again return to vim to make necessary modifications. Just follow the following commands (in visual or insert mode).


Finally, \hm to Show manual & \hp for help.


    1. Download the plugin c.vim
    2. Extract the file to .vim folder
      unzip -d ~/.vim/
    3. Enable the plugin by adding the following line in ~/.vimrc file
      filetype plugin on

http://www.vim.org/scripts/script.php?script_id=213
http://lug.fh-swf.de/vim/vim-c/c-hotkeys.pdf

找一个值得倾注一生的文本编辑器:Vim is chosen. Vim的高度可配是众多编程大神的利器 但是配置vim的众多插件资源分散 vim.org,反正我是上不去 github一般家庭网络不是很稳定 花了好多时间,攒下的vim插件大集合。 网上有一键安装vim配置的包,但是窃以为,还是自己一层一层堆砌出来的编辑器更好,就像自己的孩子一样,每一厘米的成长,每一寸肌肤的改变,你都清楚! 建议花点时间,自己配置吧: ------Plugins---------- 1 AutoComplPop-master.zip 2 a.zip 3 bufexplorer-7.4.6.zip 4 c-cpp-master.zip 5 code_complete.zip 6 cscope-15.8a.tar.gz 7 csupport.zip 8 ctags.zip 9 ctrlp.vim-master.zip 10 DoxygenToolkit.vim-master.zip 11 DrawIt.zip 12 EasyGrep-master.zip 13 EnhancedCommentify-master.zip 14 FindMate-master.zip 15 grep.zip 16 JumpInCode-new-update-master.zip 17 lookupfile-master.zip 18 Mark-master.zip 19 minibufexpl.vim-master.zip 20 neocomplcache-7.1.zip 21 neocomplete.vim-master.zip 22 nerdcommenter-master.zip 23 nerdcommenter.zip 24 nerdtree-master.zip 25 nerdtree.zip 26 omnicppcomplete-0.41.zip 27 project-1.4.1.tar.gz 28 sketch-0-3-2.zip 29 snipMate-master.zip 30 SrcExpl-master.zip 31 supertab.zip 32 Tagbar-master.zip 33 taglist_46.zip 34 TxtBrowser-master.zip 35 vim-airline-master.zip 36 vim-autocomplpop.zip 37 vim-javacomplete2-master.zip 38 visualmark.zip 39 Vundle.vim-master.zip 40 winmanager.zip 41 xptemplate-master.zip 42 YouCompleteMe-master.zip 43 ZoomWin-master.zip ----------Colors------------ 口碑配色: 1.solorized 2.molokai -----------End-------------
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值