VIM C++ (全能)自动补全: OmniCppComplete

下载:http://vim.sourceforge.net/scripts/script.php?script_id=1520

1.把下载的 omnicppcomplete.zip 解压到 ~/.vim 中

2.建立 tags:
[email protected]:/home/rok# cd /usr/local/share/
[email protected]:/usr/local/share# mkdir tags
[email protected]:/usr/local/share# cd tags/
[email protected]:/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 .

Leave a Reply

Your email address will not be published.