Setting the Vim background colors
As vim's own help on set background
says, "Setting this option does not change the background color, it tells Vim what the background color looks like. For changing the background color, see |:hi-normal|."
For example
:highlight Normal ctermfg=grey ctermbg=darkblue
will write in white on blue on your color terminal.
Changing background colors
As it turns out the big blue section is controlled by highlight NonText
I added my .vimrc file to this:
highlight NonText ctermfg=59 ctermbg=0 cterm=NONE guifg=#414e58 guibg=#232c31 gui=NONE
and that gave me exactly what I wanted.
Can vim's background color be changed based on the current mode?
check autocmd
http://vimdoc.sourceforge.net/htmldoc/autocmd.html
for vim 8
:autocmd InsertEnter * set bg=light
:autocmd InsertLeave * set bg=dark
for vim version 9.0 please check
https://yianwillis.github.io/vimcdoc/doc/autocmd.html#ModeChanged
For the example in the site, you can change to relative numbering when enter visual mode
:au ModeChanged [vV\x16]*:* let &l:rnu = mode() =~# '^[vV\x16]'
:au ModeChanged *:[vV\x16]* let &l:rnu = mode() =~# '^[vV\x16]'
:au WinEnter,WinLeave * let &l:rnu = mode() =~# '^[vV\x16]'
force vim background to black
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
Related Topics
Linux/Unix Environment Variables
How to Set Cron to Display Gui Application
What Is the Equivalent of Solution Files in Linux C++ Ide
Http Post and Get Using Curl in Linux
How to Portably Extend a File Accessed Using Mmap()
How to Get the Absolute Directory of a File in Bash
How to Show a Gui Message Box from a Bash Script in Linux
How to Get 'Find' to Ignore .Svn Directories
Difference Between Posix Aio and Libaio on Linux
How to Execute Ssh-Keygen Without Prompt
Unix: How to Delete Files Listed in a File
Cross-Compile a Rust Application from Linux to Windows
Unix Standard Directory to Put Custom Executables or Scripts