Vim colour schemes
#306 Henry, Friday, 06 November 2015 3:04 PM (Category: UNIX Tools)
(Tags: vim)

I've been using Vim for a very long time. At least 20 years. It's been my primary writing tool for software, email, writing, notes, everything. I've tweaked it and configured it and it works great. It's very effective. One thing I haven't done much with is the colour scheme. I use the default colour scheme. I have finally had to admit that the default colour scheme is not so good for editing and viewing most of the data types that I fiddle with.

Look at the default colour scheme with an XML file:

Vim default scheme with XML

The stuff I want to see is a bright blue on a bright white background. After ten years doing this XML stuff, I finally have to admit that this hurts my eyes and is not an optimal colour scheme.

I went looking for different colour schemes. I did not realise that there are hundreds of schemes out there. Many are designed to work with gvim, and I don't use that. Many are designed for Vim compiled with slang, and I have Vim compiled with ncurses, so they are not for me. But there are still many that I can use. I spent a week trying them out and testing them and finding something that looks good for regular code, and looks good for these data formats like XML. First conclusion I drew was that I was going to have to pick one with a dark background. It opens up more possibilities. I tried Solarized, but didn't take to the scheme. After many tests, I settled on gruvbox and this is what XML looks like now:

Vim gruvbox scheme with XML

I can read that easily. Doesn't hurt my eyes. And code and email looks good with it too. I'll try this for a while and see if it lasts.