Vim Tips Wiki
Advertisement

Proposed tip Please edit this page to improve it, or add your comments below (do not use the discussion page).

Please use new tips to discuss whether this page should be a permanent tip, or whether it should be merged to an existing tip.
created February 16, 2008 · complexity basic · author Metacosm · version 7.0

Omni completion provides smart autocompletion for programs. When invoked, the text before the cursor is inspected to guess what might follow. A popup menu offers word completion choices that may include struct and class members, system functions, and more. A similar feature in Microsoft Visual Studio is known as IntelliSense.

Vim 7 supports various languages, including C. Omni completion scripts can be written to support other languages, and to customize behavior. :help new-omni-completion :help compl-omni

Windows users need to install a recent version of Exuberant Ctags (Ctags 5.7, released September 2007, is recommended). :help ft-c-omni

C++ support

When editing a C++ file, enter the command :set omnifunc? to see what completion function is being used. If the result is omnifunc=ccomplete#Complete, it means you are using the C completion provided with Vim (not C++).

To support C++, install OmniCppComplete. See its doc/omnicppcomplete.txt file for information.

Related tips

 TO DO 

  • Need to make sense of this, and probably merge a few.
  • Meanwhile, keep the following list as a useful reference for readers and editors.

Popup menu and mappings

Random thoughts on IDE

Usage with Python

Insenvim

Comments

Advertisement