Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Vim reads initialization commands from a file called vimrc on startup. This can be used to set settings, define functions, execute autocommands, and more.

The vimrc file lives in $HOME/.vimrc or $HOME/.vim/vimrc on UNIX systems, and in $HOME/_vimrc or $HOME/_vimfiles/vimrc on MS Windows systems.

Neovim uses another configuration file located in ~/.config/nvim/init.vim or ~\AppData\Local\nvim\init.vimif you're using Windows 10.

You can see the currently used vimrc file with the $MYVIMRC variable, i.e. :echo $MYVIMRC.

There are many pre-made vimrc files on the internet. Popular ones are:

  • vim-sensible: Think of sensible.vim as one step above 'nocompatible' mode: a universal set of defaults that (hopefully) everyone can agree on.

  • spf13-vim: It is a good starting point for anyone intending to use VIM for development.

  • Janus: designed to provide minimal working environment using the most popular plug-ins and the most common mappings.