Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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
3  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.