1.安装ctags
apt-get install ctags
在vimrc文件中加入
map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
即可在vim中使用ctrl+F12生成ctags
2.安装taglist
从http://www.vim.org/scripts/script.php?script_id=273中下载安装包,解压后放入/usr/share/vim/vimXX/中
在vimrc文件中加入
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
完成安装
3.安装OmniCppComplete
从http://www.vim.org/scripts/script.php?script_id=1520中下载安装包,解压后放入/usr/share/vim/vimXX/中
打开vim,在vim命令模式下输入
:helptags /usr/share/vim/vimXX/doc
在vimrc文件中加入
set nocp
filetype plugin on
4.安装superTab
从http://www.vim.org/scripts/script.php?script_id=1643中下载安装包,解压后放入/usr/share/vim/vimXX/plugin/中
用vim打开解压的文件,输入
:so %
在vimrc文件中加入
let g:SuperTabDefaultCompletionType="context"
即可完成安装