Martin DeMello
Martin DeMello

Reputation: 12336

force vim background to black

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.

Upvotes: 22

Views: 36181

Answers (2)

yukashima huksay
yukashima huksay

Reputation: 6238

This is what worked for me:

colorscheme wombat256
hi Normal ctermbg=16 guibg=#000000
hi LineNr ctermbg=16 guibg=#000000

Upvotes: 7

sehe
sehe

Reputation: 392833

 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

Upvotes: 32

Related Questions