I don't have 'colorscheme BusyBee' in my .vimrc. I like to switch colorscheme now and then, so i want to "fix" the actual theme.
I came up with this solution, not the prettiest, but whatever.
function! FixColorscheme() " {{{
echo "fixing colorscheme"
if has("gui_running")
if (g:colors_name =~ "busybee")
hi Folded guibg=#001336 guifg=#003DAD gui=none
hi CursorLine guibg=#000000 ctermbg=Black cterm=none
elseif (g:colors_name =~ "256-jungle")
hi CursorLine guibg=#000000 ctermbg=Black cterm=none
elseif (g:colors_name =~ "xoria256")
hi Folded guibg=#001336 guifg=#003DAD gui=none cterm=none
"hi Folded ctermbg=234 ctermfg=25 cterm=none
endif
elseif &t_Co == 256
if (g:colors_name =~ "busybee")
hi Folded guibg=#001336 guifg=#003DAD gui=none
hi CursorLine guibg=#000000 ctermbg=Black cterm=none
elseif (g:colors_name =~ "256-jungle")
hi CursorLine guibg=#000000 ctermbg=Black cterm=none
elseif (g:colors_name =~ "xoria256")
hi Folded ctermbg=234 ctermfg=25 cterm=none
hi CursorLine cterm=none
"else
"hi CursorLine ctermbg=0 cterm=none
endif
endif
endfunction
" }}}
Run it automatically when changing color scheme.
augroup mycolorschemes
au!
au ColorScheme * call FixColorscheme()
augroup END
And this helps to load your favorite-scheme-of-the-week on startup. (eek!! the default!)
if iSFirstRun == 1
echo "HI"
colo xoria256
call FixColors()
endif
.. and this at the very top of .vimrc
"" To let us set some settings only once. {{{
if exists("isRunning")
let isFirstRun = 0
else
let isFirstRun = 1
endif
let isRunning = 1
" }}}
Perhaps there already is something for this 'isFirstRun'?