Omni Completion
From Vim Tips Wiki
Proposed new tip
Please do not discuss this tip on this page, and do not edit the talk (discussion) page.
Created: February 16, 2008
Complexity: basic
Author: Metacosm
Version: 7.0
Instructions for Vim 7.0
See :help new-omni-completion.
Omni completion support comes out of the box for several languages (e.g. C).
MS Windows users will also want to install [Exuberant Ctags | http://georgevreilly.com/vim/ctags.html].
C++ support
Try doing :set omnifunc while editing a C++ file.
If you get omnifunc=ccomplete#Complete as a result, it means you are presently using not C++, but the bundled C completion.
To get C++ completion support you can try installing OmniCppComplete. Please read the doc/omnicppcomplete.txt file in the archive for further help.
_Note:_ In *NIX these files go into your ~/.vim directory. In MS Windows you put them in %HOMEPATH%/vimfiles.
[edit] Comments
The above recommends the georgevreilly.com site, but that site says it has a patched version of Exubert Ctags 5.5.4, whereas the http://ctags.sourceforge.net/ official distribution is now 5.7. Also, :help ft-c-omni currently says to use the official site, and recommends 5.6 or later. --JohnBot 03:10, 1 March 2008 (UTC)
