force vim background to black

Martin DeMello picture Martin DeMello · Sep 30, 2011 · Viewed 27.5k times · Source

Is there any way, in my vimrc, to override the background setting of my colorscheme and force it to black? I'm looking for something like

set colorscheme=wombat256
override_background(black)

so that whatever scheme I select, the background gets forced to black.

Answer

sehe picture sehe · Sep 30, 2011
 colorscheme wombat256
 highlight Normal guibg=black guifg=white
 set background=dark

Tweak to taste :)

@edit: after reading you later comment I suspect you'll find you need to override more related highlight (group) background colors. It'll be clearest which ones, by reading the existing color schemes