Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

force vim background to black

Tags:

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.

like image 738
Martin DeMello Avatar asked Sep 30 '11 21:09

Martin DeMello


People also ask

How do I make my Vim background darker?

In Vim, if your color scheme supports both a light and dark mode, you switch between by using the command: set background=dark or set background=light . In Alacritty, you can define multiple color schemes and switch between them easily in the config file alacritty.

How do I change my GVim color scheme permanently?

In Ubuntu make a file with the name . vimrc in your Home directory if it doesn't exist, add colorscheme pablo in it and save it. Now restart GVim. For Windows put this file with the name _gvimrc in C:/Documents and Settings/<your-username> .

What is Termguicolors Vim?

Note, termguicolors is required for correct colors to be displayed when running Vim or Neovim in a terminal. It is not an option to have this unset, it is a requirement when in terminal mode otherwise the theme will not work.


1 Answers

 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

like image 128
sehe Avatar answered Nov 02 '22 05:11

sehe