Tip 1486 Printable Monobook Previous Next

created January 23, 2007 · complexity basic · author RedBeard0531 · version 7

The omni complete feature in Vim is great. Here are some suggestions for working with the popup completion menu.

Setting the color[edit | edit source]

Try the following command to improve the color of the popup menu (add to your vimrc if you always want this choice):

:highlight Pmenu guibg=brown gui=bold

In console Vim, you might want a command like this:

:highlight Pmenu ctermbg=238 gui=bold

To see how different color schemes look, try (see view all colors):

:runtime syntax/colortest.vim

Better still would be to use a color scheme that is designed with the completion menu in mind. For example, marklar.vim Dark colorscheme based on green chalkboard.

Using SuperTab[edit | edit source]

The SuperTab plugin can be used to avoid needing to press Ctrl-X then Ctrl-O to invoke the popup completion menu. With SuperTab installed, the following setting means you can just press Tab instead.

let g:SuperTabDefaultCompletionType = "<C-X><C-O>"

You may also try the context value, which lets SuperTab decide which completion mode to use and should play well with OmniCompletion:

let g:SuperTabDefaultCompletionType = "context"

References[edit | edit source]

Comments[edit | edit source]

Community content is available under CC-BY-SA unless otherwise noted.