下载:http://vim.sourceforge.net/scripts/script.php?script_id=1520
1.把下载的 omnicppcomplete.zip 解压到 ~/.vim 中
2.建立 tags:
root@ROK:/home/rok# cd /usr/local/share/
root@ROK:/usr/local/share# mkdir tags
root@ROK:/usr/local/share# cd tags/
root@ROK:/usr/local/share/tags# ctags -R –c++-kinds=+p –fields=+iaS –extra=+q /usr/include/c++/4.1.2/
3.在 .vimrc 中添加:
set nocp
filetype plugin on
filetype indent on
set tags+=/usr/local/share/tags/tags
au BufWritePost *.c,*.cpp,*.cc,*.h !ctags -R –c++-kinds=+p –fields=+iaS –extra=+q .
Comments