Colorschemes in VIMΒΆ

I use vim. I happen to use it a lot actually. So eventually, I became tired of the default colorscheme and the others that came with vim weren’t aesthetically pleasing to me. In my quest to find a colorscheme that looked good both in the terminal and in gVim, I noticed a problem. My ~/.vimrc looked something like:

" vim: ft=vim ts=3 sw=3
" snip
set t_Co=256
colorscheme wombat256
" snip
syntax enable

As a result I started seeing errors after invoking vim at the commandline:

user@darkstar:~$ vim .vimrc
Error detected while processing /usr/share/vim/vim73/syntax/synload.vim:
line   19:
E185: Cannot find color scheme wombat256mod

What this means is that while trying to load the synload.vim file, a variable declaration inside of wombat256.vim was causing a problem. The line in question was:

let colors_name = "wombat256mod"

The issue seems to be with trying to load the colorscheme before enabling syntax highlighting. The fix? Quite simple actually:

" vim: ft=vim ts=3 sw=3
" snip
syntax enable
colorscheme wombat256