Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting vim omnicompletion colors (Pmenu) in vimrc not working

Tags:

vim

I am trying to customize my vim popup completion menu as per this guide: Vim Wiki: "Omni completion popup menu". It notes

add to your vimrc if you always want this choice.

However, with the following settings in my .vimrc file

colo desert

filetype plugin on
set ofu=syntaxcomplete#Complete
highlight Pmenu guibg=brown gui=bold

I get the following:

Gahhhh! My eyes!

Note: when I manually enter the highlight command manually, it works:

enter image description here

How do I get the popup to use a color scheme defined in .vimrc without having to enter it in manually each time?

like image 396
noahlz Avatar asked May 04 '12 18:05

noahlz


3 Answers

if you put your commands in below sequence, you can get what you want. the syntax option will override your highlight option.

"" gui configuration
color murphy
syntax one
highlight Pmenu guibg=brown gui=bold

enter image description here

like image 177
j5shi Avatar answered Nov 08 '22 11:11

j5shi


See vim - Override colorscheme

Short answer is that you can't. If you use a colorscheme, then all other color scheme tweaks in your .vimrc are ignored. The AfterColors plugin solved the problem for me.

like image 37
noahlz Avatar answered Nov 08 '22 11:11

noahlz


Hmm, most likely there is a highlighting command coming afterwards that is overriding your option. Probably when the filetype is determined and adjusts options. Try running it without the filetype plugin on option set.

If that works, you'll need to adjust the filetype detection to run your special options afterwards.

like image 29
Spencer Rathbun Avatar answered Nov 08 '22 12:11

Spencer Rathbun