Vim syntax Highlighting

blakcaps picture blakcaps · Jun 10, 2011 · Viewed 24.9k times · Source

I have installed vim in Debian 6. I am trying to change color scheme and enable syntax highlighting. But it's not working. I added set background=dark in .vimrc file. But white background is displaying. I wonder what went wrong?

Here is my .vimrc file: http://pastebin.com/8k2gpWDh

I installed robokai colorscheme which has dark background. But the background looks white instead dark. Other colors of colorscheme working.

Answer

sidyll picture sidyll · Jun 10, 2011

Make sure you have

syntax on

And then call

color[scheme] {name}

To set your desired colorscheme. These contain the set background=dark you refered, so it should be a matter of choosing the right one. Vim comes with some color schemes, but you may want to install new ones.

This page and this one provide tips on color schemes, and there is a test page very helpful when choosing colorschemes.