Quantcast
Channel: Changing Vim background color - and not text color - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Badacadabra for Changing Vim background color - and not text color

$
0
0

Is it possible, to just change the background color between 2 color (light grey and dark grey) without affecting text color, going from Insert Mode to Command Mode?

The answer is yes!

The trick consists in using GUI colors directly (like GVim) instead of terminal ones. Please try this:

  1. Add set termguicolors before setting the colorscheme in your .vimrc
  2. Add autocmd InsertEnter * hi Normal guibg=#4D4D4D
  3. Add autocmd InsertLeave * hi Normal guibg=#333333

If your terminal is compatible and your Vim distribution is up-to-date, it should work.

If you like dark Vim colorschemes, you might be interested in Archery. I have shared the project on GitHub: https://github.com/Badacadabra/vim-archery


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>