Tip #178: Making a "derived" colorscheme without copy & paste
tip karma |
Rating 12/6, Viewed by 557
|
created: |
|
December 13, 2001 5:29 |
|
complexity: |
|
intermediate |
author: |
|
Cory T. Echols |
|
as of Vim: |
|
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.
<<Highlight matching brackets as one moves in normal mode (plugin) |
Simplify help buffer navigation >>
Additional Notes
|