Vim Tips Wiki
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
FANDOM
Explore
Current Wiki
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Vim Tips Wiki
1,649
pages
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
Editing
Create a color scheme based on another
Back to page
Edit
Edit source
View history
Talk (0)
Edit Page
Create a color scheme based on another
We recommend that you
log in
before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your
Watchlist
.
Creating an account
is quick and free.
The edit appears to have already been undone.
Anti-spam check. Do
not
fill this in!
{{TipImported |id=178 |previous=176 |next=180 |created=December 13, 2001 |complexity=intermediate |author=Cory T. Echols |version=6.0 |rating=24/14 |category1=Syntax |category2= }} 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: <pre> "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 </pre> That's all there is to it. If you want to create rules for a color terminal instead of a GUI, you would obviously use ctermfg, ctermbg, and cterm instead of guifg, guibg, and gui. If the only thing you don't like about a colorscheme is the lack of cterm support, then you can eliminate the "hi clear" statements and just apply the cterm statements. They will add or change any existing cterm color without modifying the gui definitions. If the color scheme does not define colors for a cterm at all, then it is probably easier to use the {{script|id=2390|text=CSApprox plugin}} to allow you to just use the GUI colorscheme directly, instead of trying to come up with replacement colors on your own. ==Comments==
Summary:
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Navigation
(
view source
)
Template:Script
(
view source
)
Template:TipImported
(
view source
)
Follow on IG
TikTok
Join Fan Lab