fedora17的vim+ctags+taglist+clang_complete

之前在百度实习的时候,用的开发环境vim+ctags+taglist,感觉挺好用的。所以今天自己回家装一个用用。

1.ctags安装: ctags可以让你的vim从函数声明,直接跳转到函数定义,而不用从vim重新打开cpp

a)源码 : http://ctags.sourceforge.net/

b) su进入root用户

c)解压后进入目录 ./configure , make , make install

        d)一路稀里哗啦后,再设置一个快捷健,可以实时更新你的tag,在 /etc/vimrc文件下添加  map <C-F12> :!ctags -R * .<CR> 

d)最主要的两个快捷键:ctr+】 和 ctr+t.一个是进入函数,一个是返回上层函数

2.taglist安装: 可以让你的一个cpp里的函数定义以一个列表显示到你的vim上。

具体安装和使用看官网这个吧

0.download linker http://ctags.sourceforge.net/

  1. For taglist version 3.1 and above
    Download the taglist.zip file and unzip the files to the $HOME/.vim or the $HOME/vimfiles or the $VIM/vimfiles directory. This should unzip the following two files (the directory structure should be preserved):
          plugin/taglist.vim - main taglist plugin file
          doc/taglist.txt    - documentation (help) file
    
    For taglist version 3.0 and below
    Copy the taglist.vim plugin file to the $HOME/.vim/plugin directory.

    Refer to the 'add-plugin', 'add-global-plugin' and 'runtimepath' Vim help pages for more details about installing Vim plugins.

  2. Change to the $HOME/.vim/doc or $HOME/vimfiles/doc or $VIM/vimfiles/doc directory, start Vim and run the ":helptags ." command to process the taglist help file. Without this step, you cannot jump to the taglist help topics.
  3. If the exuberant ctags utility is not present in your PATH, then set the Tlist_Ctags_Cmd variable to point to the location of the exuberant ctags utility (not to the directory) in the .vimrc file.
  4. If you are running a terminal/console version of Vim and the terminal doesn't support changing the window width then set the 'Tlist_Inc_Winwidth' variable to 0 in the .vimrc file.
  5. Restart Vim.
  6. You can now use the ":TlistToggle" command (previously ":Tlist") to open/close the taglist window. You can use the ":help taglist" command to get more information about using the taglist plugin.

3. clang_complete,代码补全

编辑器么起码要有代码补齐功能,不然vs+VA就可以虐vim了。现在vim上也有

a)yum install clang (我用的fedora)ubuntu用户自己安装clang

b)从http://www.vim.org/scripts/script.php?script_id=3302&rating=life_changing 上下载一个vmb,一般我用最新的.

  c)If you have installed vimscript #1520, please remove it, as it is confliting with this one. 

d)To install: vim clang_complete.vmb -c 'so %' -c 'q'具体安装就这一条命令就可以了。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值