vim color schemes with dark and light backgrounds
I’m looking for a nice color scheme in vim for (1) dark background, and for (2) light background. Also, I want to be able to switch between them easily.
For dark background I prefer the elflord theme, which comes with the standard installation. It can be found here:
For finding a nice and simple theme for light background I had to do some research. Finally I came across the trivial256 color scheme. However, I didn’t like that strings were colored red so I changed one line:
hi String ctermfg=darkgreen
The modified version can be downloaded from here.
Create the directory
.vim/colors in your HOME directory and copy
trivial256.vim in there. I created two symlinks too called
dark.vim -> /usr/share/vim/vim73/colors/elflord.vim light.vim -> trivial256.vim
Specify in your ~/.vimrc which one should be the default:
colorscheme dark "colorscheme light
In vim you can change the color scheme easily:
:colo light :colo dark
You need to type just one of them. Notice that the extension “.vim” is omitted.
With dark background (click to enlarge):
With light background (click to enlarge):
- Vim Color Scheme Test (choose a category from “Browse By File Type” to see ’em all)