Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed vim by

sudo apt-get install vim

Now I want to customize it, but there are two vimrc files – one in /etc, second is in /usr/share folder. Both have a vimrc file.

Why are there two vim folders and which one should I use?

share|improve this question
up vote 9 down vote accepted

Neither. You want to create a new file, .vimrc – notice the dot at the beginning – and place it in your $HOME (/home/your-username/) folder. (It'll be hidden from ls without -a option because of the dot.)

share|improve this answer
thanks, but why then there are vim folders in /etc and /usr/share? – Sergey Aug 15 '11 at 13:40
The one in /usr/share is the default settings that come with the program applied to all users, and will be overwritten if you upgrade your vim package -- so you don't want to make changes there. The one in /etc is for making changes which affect all users that won't be overwritten when the package is updated. But a .vimrc is a very personal thing, and generally, you only want to make changes that affect you, so they go in your home folder. – frabjous Aug 15 '11 at 14:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .