Skip to content →

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

下载: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 .

Published in Linux

Comments

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.