created December 13, 2001 · complexity intermediate · author Cory T. Echols · version 6.0
Suppose there's a colorscheme that you're pretty fond of, but hate one or two particular aspects about. For example, I love the "blue" colorscheme that ships with vim, but I find it's colors for the non-active status line to be unreadable. Here's how to create a colorscheme which extends "blue" without copying it to a new file and editing it.
In my ~/.vim/colors, I created a "my-blue.vim" file with these contents:
"these lines are suggested to be at the top of every colorscheme hi clear if exists("syntax_on") syntax reset endif "Load the 'base' colorscheme - the one you want to alter runtime colors/blue.vim "Override the name of the base colorscheme with the name of this custom one let g:colors_name = "my-blue" "Clear the colors for any items that you don't like hi clear StatusLine hi clear StatusLineNC "Set up your new & improved colors hi StatusLine guifg=black guibg=white hi StatusLineNC guifg=LightCyan guibg=blue gui=bold
That's all there is to it.
Please correct this example to show people how to porperly create color schemes that will work not only for gvim but for vim as well.