JohnBeckett (talk | contribs) m (Change the pink omnicomplete popup to a readable color moved to Omni completion popup menu: more helpful; hope will contain more info later) |
JohnBeckett (talk | contribs) (reword and merge in tip from 200807) |
||
Line 11: | Line 11: | ||
|category2= |
|category2= |
||
}} |
}} |
||
− | The omni complete feature in Vim is great |
+ | 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: |
||
⚫ | |||
<pre> |
<pre> |
||
+ | :highlight Pmenu ctermbg=238 gui=bold |
||
⚫ | |||
+ | </pre> |
||
+ | |||
⚫ | |||
+ | <pre> |
||
⚫ | |||
+ | </pre> |
||
+ | |||
⚫ | |||
+ | |||
+ | ==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== |
||
⚫ | |||
− | |||
− | 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
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>"