* $VIM may not be set in your shell, but is always set inside Vim. Resetting other options (see 'compatible'). Vimrc file in the current directory, or the "VIMINIT" environment variable is But as soon as a user vimrc file is found, or a When Vim starts, the 'compatible' option is on. Note that the mere existence of a user vimrc will change Vim's behavior by turning off the compatible option. The files are searched in the order specified above and only the first MS-Windows $HOME/_vimrc, $HOME/vimfiles/vimrcĪmiga s.vimrc, home.vimrc, home:vimfiles:vimrc Places for your personal initializations: Unix $HOME/.vimrc or $HOME/.vim/vimrc They are the same type ofįile, but "exrc" is what Vi always used, "vimrc" is a Vim specific Sometimes also referred to as "exrc" file. In most cases, settings in the user vimrc will override settings in the system vimrc.Ī file that contains initialization commands is called a "vimrc" file.Įach line in a vimrc file is executed as an Ex command line. Also, changes here will affect other users on a multi-user system.
If you modify this file your changes may be overwritten if you ever upgrade Vim. The system vimrc is not a good place you keep your personal settings. The system vimrc should normally be left unmodified and is located in the $VIM * directory. If you cannot find $HOME/.vimrc (or $HOME/_vimrc on Windows) then you can, and probably should, just create it. The user vimrc file often does not exist until created by the user. the system vimrc in $VIM (on Amiga systems, s.vimrc is considered a user vimrc).Note that exisitence of this file will disable the compatible option. Insert the settings you want, and save the file.
To create your vimrc, start up Vim and do one of the following: :e $HOME/.vimrc " on Unix, Mac or OS/2