Search code examples
vimcolor-scheme

How to set default vim colorscheme


The latest upgrade of Ubuntu made my vim colorscheme unusable. I know how to set it manually (:colo evening, for example), but I want to set the default for all vim sessions. I see reference in other places to .vimrc, but the right location and syntax have eluded me thus far.


Solution

  • Your .vimrc file goes in your $HOME directory. In *nix, cd ~; vim .vimrc. The commands in the .vimrc are the same as you type in ex-mode in vim, only without the leading colon, so colo evening would suffice. Comments in the .vimrc are indicated with a leading double-quote.

    To see an example vimrc, open $VIMRUNTIME/vimrc_example.vim from within vim

    :e $VIMRUNTIME/vimrc_example.vim