I just finished downloading and installing vim (gvim) on my Mac (Mac OS X 10.5.x to be precise), and then struggling for a while to set the default colorscheme, I thought I’d make a brief note here about how to set the default colorscheme properly.
Setting a default gvim color scheme (colorscheme)
As a friend of mine once, said “It’s easy to do, once you know how to do it.” For me, that applies to setting a default colorscheme for gvim on Mac OS X.
To set your vim default colorscheme to a theme named “slate,” just follow these steps:
1) First, edit a file named ~/.gvimrc
. If it doesn’t already exist, create it.
2) Second, add the following lines to that file. If the file already exists, just put these lines at the end of the file, otherwise just insert them.
" color scheme of the moment: syntax on colorscheme slate
3) Third, save your changes, then restart vim/gvim. The “slate” colorscheme should now be your default color scheme. If you want a different scheme to be your default — say the “desert” scheme — just change that last line to this:
colorscheme desert
In summary, if you want to see how to set the default gvim color scheme, I hope this is helpful.