noahlz
noahlz

Reputation: 10311

Setting vim omnicompletion colors (Pmenu) in vimrc not working

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?

Upvotes: 7

Views: 8579

Answers (3)

j5shi
j5shi

Reputation: 867

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

Upvotes: 8

noahlz
noahlz

Reputation: 10311

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.

Upvotes: 4

Spencer Rathbun
Spencer Rathbun

Reputation: 14900

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.

Upvotes: 1

Related Questions