Thursday, October 21, 2010

newsprint.vim: A (pleasant) monochromatic color scheme for Vim

I spend over 90% of my time sitting in an editor.

Having switched to a dark-on-light terminal scheme years ago I could never find a color scheme in which I could be productive using a light background, so I stuck with my ancient light-on-dark color scheme for console editing. The effect is actually quite jarring; I use a number of terminal sessions during the day for any number of tasks (including editing). Perhaps it's simply a sign of getting older, but I've found that switching rapidly between sessions can not only cause eyestrain, it also wastes time waiting for my eyes to adjust to a radically different background.

I created a simple color scheme that works well with dark-on-light displays. I drew some inspiration from the google color scheme (notably the use of underlining for language keywords). Rather than saturate the screen with color, I opted for a simpler scheme using a grayscale pallete with bolding and underlining for emphasis. This scheme should work equally well on both color and GUI terminals.

The color scheme can be found here. Simply download and place under $HOME/.vim/colors/. You can select the scheme by issuing: :colorscheme newsprint once in Vim.

Obligatory screenshot:

Overall, I'm pleased with the result. Moving between sessions is a smoother and faster experience. While this scheme probably isn't suitable for long-term editing, it's certainly better for quick edits made from the console.