Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between the system wide vimrc and a user's vimrc?

Tags:

vim

I already have a .vimrc in my home dirrectory(~). but still I need to use set nocompatible in my vimrc for certain feature.

like image 638
ravi Avatar asked Aug 11 '11 15:08

ravi


1 Answers

Note: This answer was rewritten after Jens pointed out that I totally screwed it up. My thanks to him for the correction.

It's in the docs. The system vimrc file (often found in /etc/vimrc or /etc/vim/vimrc) performs the system-wide default initializations. Following that, vim looks in 4 different places for user-specific initializations, one of which is ~/.vimrc (this is described in the next section of the docs). The first of those that exists is used, the others are ignored.

like image 89
Peter Rowell Avatar answered Nov 15 '22 09:11

Peter Rowell