vim Configuring Vim The vimrc file

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


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.

Got any vim Question?