I run vim
in a full-screen bash
terminal with transparency enabled. (This is a nice setup for a laptop--almost makes me not miss my multi-monitor rig when I'm away from my desk.)
The trouble I'm running into is that most color schemes, such as the otherwise excellent desert256
, set some kind of highlighting color behind the text, usually black. The net effect is a mostly transparent terminal with blocks of black behind each line of code, obscuring whatever they are in front of.
Some of the default color schemes, such as elflord
, do not do this. The background remains consistently transparent.
Is there a setting I can execute in my .vimrc
after setting the colorscheme
to remove the text background color? I use a pathogen
plugin to refresh my color schemes from GitHub, so I don't want to edit my local copies.
The ctermfg=white is used to set the foreground color to white in a terminal text editor. Finally, the ctermbg=black is used to set the background color to black in a terminal text editor.
You can change color schemes at anytime in vi by typing colorscheme followed by a space and the name of the color scheme. For more color schemes, you can browse this library on the vim website. You can enable or disable colors by simply typing "syntax on" or "syntax off" in vi.
The default Vim color scheme in a light terminal is peachpuff . If you use a dark terminal, the initial color scheme is ron .
By default, Vim looks for colorschemes in the <runtimepath>/colors/ directory.
Found the answer. I added this to my .vimrc
after the colorscheme
line:
hi Normal ctermbg=NONE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With