I want to select a color scheme in gVim such that it's used always (i. e. if I select color scheme X, close gVim, and start it again, it should start with X as the color scheme, not the default one).


How can I do it?

Just selecting the color scheme (see menu in the screenshot above) doesn't help.


In Vim, settings are saved across sessions by writing them in an init script called vimrc.

On Windows, that vimrc is supposed to be at this location:


The installer may or may not have created that file for you, so you'll have to create if it doesn't exist. Do :echo $HOME in Vim to know where to create that directory and that file.

To save your colorscheme choice, add this line to your vimrc:

colorscheme slate

See this document.

| improve this answer | |

In Windows 10 nowadays you have to edit (with admin privileges) the file _vimrc located in %ProgramFiles(x86)%\Vim\_vimrc And add the line: colorscheme <colorscheme>

Font where i found the way to solve this: http://vim.wikia.com/wiki/Change_the_color_scheme

| improve this answer | |
  • There's no reason to edit the _vimrc in the program files directory. :e $HOME/_vimrc and put the colorscheme command there. – jamessan Nov 24 '18 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.