Home > vim > vim color schemes with dark and light backgrounds

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: /usr/share/vim/vim73/colors/elflord.vim.

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 light.vim and dark.vim:

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):



  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: