gvim color scheme - How to set the default gvim colorscheme

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 simple steps:

First, edit a file named ~/.gvimrc. If it doesn't already exist, create it.

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

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

 

Thanks, this works for me..

Thanks, this works for me..

Post new comment

The content of this field is kept private and will not be shown publicly.