I often find myself wanting to change just something little in a colorscheme, but i don't want to edit the original file. I tried putting my change in '~/.vim/after/colors/blah.vim', but that doesn't work for me.
Example, I want to change the CursorLine highlight in BusyBee.vim..
~/.vim/colors/BusyBee.vim
I create the file '~/.vim/after/colors/BusyBee.vim' and add this:
hi CursorLine guibg=#000000 ctermbg=Black cterm=none
However, i don't see the change. Of course it works if i change the line in the originial BusyBee.vim, but like i said i'd prefer not to do that.
Doing...
:colo Busy<TAB>
Shows me...
BusyBee BusyBee
You asked what I'm looking for today. I found a simpler solution than those presented here. I want transparent background instead of the black background from the theme, while simply overriding the color after the colorscheme
statement in .vimrc
doesn't work and installing a plugin just for that is weird. Here is what I did:
autocmd ColorScheme * highlight Normal ctermbg=None
autocmd ColorScheme * highlight NonText ctermbg=None
Why does it work? I guess that vim does something besides just read your colorscheme
statement and load the statement and then read your highlight
statement and change the color. Anyway it seems like vim only change the color scheme after reading the config files. So I provide a hook, that will change the colors every time the color scheme is changed. A nice side effect is, this works even if you switch your color scheme (you could do an if
block if you want to).