Vim Tips Wiki
Register
m (Change the pink omnicomplete popup to a readable color moved to Omni completion popup menu: more helpful; hope will contain more info later)
(reword and merge in tip from 200807)
Line 11: Line 11:
 
|category2=
 
|category2=
 
}}
 
}}
The omni complete feature in Vim is great especially with SuperTab {{script|id=1643}}. However the hideous choice of color makes it ugly and unreadable. You can use the highlight command to make it look better.
+
The [[Omni completion|omni complete]] feature in Vim is great. Here are some suggestions for working with the popup completion menu.
   
  +
==Setting the color==
Run the following command or add it to your [[vimrc]]:
 
  +
Try the following command to improve the color of the popup menu (add to your [[vimrc]] if you always want this choice):
 
<pre>
 
<pre>
 
:highlight Pmenu guibg=brown gui=bold
 
:highlight Pmenu guibg=brown gui=bold
 
</pre>
 
</pre>
   
  +
In console Vim, you might want a command like this:
To see how different color schemes look run something like this (from [[VimTip634]]).
 
 
<pre>
 
<pre>
  +
:highlight Pmenu ctermbg=238 gui=bold
:source /usr/share/vim/vim70/syntax/colortest.vim
 
  +
</pre>
  +
 
To see how different color schemes look, try (see [[VimTip634|view all colors]]):
  +
<pre>
 
:runtime syntax/colortest.vim
  +
</pre>
  +
 
Better still would be to use a color scheme that is designed with the completion menu in mind. For example, {{script|id=1483|text=marklar.vim Dark colorscheme based on green chalkboard}}.
  +
  +
==Using SuperTab==
  +
The {{script|id=1643|text=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.
  +
<pre>
  +
let g:SuperTabDefaultCompletionType = "<C-X><C-O>"
 
</pre>
 
</pre>
   
Line 27: Line 41:
   
 
==Comments==
 
==Comments==
Or you could just use a colorscheme that is designed with the completion menu in mind. Like {{script|id=1483}}.
 
 
This didn't work for me. Instead of changing guibg to brown I had to change ctermbg to something else to change the obnoxious background. I used this command :highlight Pmenu ctermbg=238 gui=bold
 
 
----
 

Revision as of 07:22, 27 March 2009

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

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

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>"

References

Comments