The .vimrc
file (pronounced Vim-wreck) is a Vim configuration file. It holds commands that will be executed by Vim every time it starts.
By default the file is empty or non-existent; you can use it to customize your Vim environment.
To find out where Vim expects the vimrc file to be stored, open Vim and run:
:echo $MYVIMRC
Unix: on a Unix system such as Mac or Linux your vimrc will be called .vimrc
and usually be located in your home directory ($HOME/.vimrc
).
Windows: on Windows it will be called _vimrc
and located in your home directory (%HOMEPATH%/_vimrc
).
On startup, Vim will search in multiple places for a vimrc file. The first that exists is used, the others are ignored. For a full reference see the :h $MYVIMRC
documentation article.