I use different colorschemes depending on the color of my xterm. Some of them (in particular
torte) set the background color to black, others leave the background color the same as the xterm color. The colorscheme is specified as an environment variable for each xterm.
I also use the lines
set hlsearch hi Search ctermfg=white ctermbg=black cterm=NONE hi IncSearch ctermfg=Black ctermbg=lightyellow cterm=bold,underline,reverse
which highlight with a black background my search term. Obviously this doesn't help me when the background is already black. So I'd like to condition the above lines (specifically
ctermfg) on the value of the environment variable which specifies my color scheme. (Specifically, whether this value is
torte) Should be easy but I'm hopeless with vim syntax. Thanks!