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?


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.)

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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