Vim Railscasts Colorscheme

VIM in my muscle memory is one of my popular posts, the day I published it, I attracted over 3,200 unique views in a single day, mostly from Hacker News and Reddit Programming. Although it is an extremely densely packed post with lots of information, I hope it has helped some to appreciate VIM like I do.

In my several years of VIM usage, I have tried several colorscheme’s, though I have come to like only a select few. One colorscheme that I have liked the most and have always ended up coming back to is the Railscasts theme. There are 2 versions of this script :

  1. - the original GUI only theme by Josh O’Rourke.
  2. - as the name suggests, this is an extension of the original theme by Josh O’Rourke with sane 256 color equivalents for terminal vim written by Nick Moffitt.

I have tried both versions, but there are several inconsistencies between them. I also tried using Josh’s version along with csapprox, but I did not like some of the color conversions made by it. It was simply not ‘coherent’ enough for my liking between the gui & terminal. Also some of the elements of Nick’s version in the terminal were annoying, for eg.) the default (Normal) background for terminal in Nick’s version was transparent. I use a terminal with transparency so I can often read stuff from my editor in the background or even the browser, but this does not work well with my editor, when I am coding I would not like the distraction of anything behind my code.

Since I use Tmux a lot, as is obvious from my Tmux Powerline Special Characters Issue post, I have been working a lot with the vim in the terminal lately, and the fact that gui vim doesn’t play very well with Rvm unless launched from the right context, inspite of using Tim Pope plugin, also added to that. I noticed more and more how the terminal & gui versions of vim don’t look similar enough for my liking.

So last night after searching a lot for a more coherent version of the railscasts colorscheme and not having found any, I spent a great deal of time in vim’s help to try and figure out how the whole syntax highlighting works and how I can tweak it. I finally tweaked the theme by merging both Josh’s & Nick’s versions and adding a lot more fixes to it to make the gui & terminal versions more coherent. I optimized almost every sintax highlighting group I could think of and tried to find good matches of the gui colors to those available in the terminal (for xterm with 256 colors). You can find my version at

I would like to give a shout out to 2 great plugins that helped me immensly in getting this done :

comments powered by Disqus