从http://download.csdn.net/detail/derkampf/9853042下载所需工具
一.安装vimplus
按照http://blog.csdn.net/freeking101/article/details/62037015安装
安装完成后注意红帽目前不支持YouCompleteMe,所以屏蔽”Plugin ‘Valloric/YouCompleteMe’
二.安装ctags
红帽系版本7以上直接用yum
yum install ctags -y
三.安装,配置,使用cscope
(1)安装
红帽系版本7以上直接用yum
yum install cscope -y
(2)配置
将cscope_maps.vim拷贝到/root/.vim/plugin下
注意:
如果启动vim报错duplicate cscope database not added,只需要屏蔽出错行即可,详细原因参见http://www.cnblogs.com/sunj/archive/2012/03/12/2391610.html
(3)使用
进入源代码根目录
$ ctags -R
递归生成标签文件
$ cscope-indexer -r
或者在希望作tags的目录下执行下面这个脚本
#!/bin/bash
find . -name ”*.h” -o -name ”*.c” -o -name ”*.cc” -o -name "*.hpp" -o -name "*.cpp"> cscope.files
cscope -bkq -i cscope.files
ctags -R
详细请参考http://blog.163.com/libo_5/blog/static/15696852011063212264/
关于使用http://blog.csdn.net/daofengdeba/article/details/7606616