created 2005 · complexity basic · author vineeth · version 6.0
In gvim, after changing the default color scheme, the next time gvim is started, the default setting is restored.
To retain the color scheme add
colorscheme <scheme_name> to
MS Windows: Make sure
HOME exists and is set to where your
vimrc file is located. The
$HOME environment variable can be set by going to your desktop, right click on "My Computer", click the "Advanced" tab, select "Environment Variables". If
HOME is not in the list of variables, create a new variable named HOME and point it to the location of your vimrc.
On Unix/Linux/MacOSX this should be preset and can be seen by going to a command prompt/Terminal window and typing
echo $HOME or in vim enter
colorscheme <colorscheme> is not loading properly on startup, edit your
gvimrc file and comment out or remove the lines containing
Save your changes and start vim.
You can set your preferred color scheme in gvim for MS Windows by editing the file
C:\Program Files\Vim or the location where you installed Vim.
vimrc and add a line like
colors <your color scheme> as the last line. For example:
Save the file and start gvim you will see your color scheme.
MS Windows: (this particular example applies to any instance of gvim), :help gvimrc states that for MS Win32 if
vimrc is not in
$HOME, the _gvimrc in $VIM. You may display these by issuing,
:echo $VIM, or
:echo $VIM from within
DG12 18:59, December 6, 2009 (UTC)