Find the answer to your Linux question:
Results 1 to 5 of 5
vimrc is the file used to configure the editor Vim. as general rule there are two vimrc files per user, one is in /usr/share/bin and the other in the home ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    6

    vimrc in ubuntu


    vimrc is the file used to configure the editor Vim.

    as general rule there are two vimrc files per user, one is in /usr/share/bin and the other in the
    home directory of each user (~/).

    I don't know what happen in Ubuntu, the vimrc file in the home directory doesn't exist and there is an other vimrc file in /etc/vim.

    Can someone explain me what is the purpose of this third vimrc file in the directory /etc/vim ?
    why the vimrc file in the home directory doesn't exist in Ubuntu?

    I'm working with Ubuntu 10.04 (in a virtual machine)

    thanks.

    Javier.

  2. #2
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    as general rule there are two vimrc files per user, one is in /usr/share/bin and the other in the
    home directory of each user (~/).
    no, there are more. let me formulate this sentence more accuratly:

    a program has its default configuration stored somewhere in /usr (usually /usr/share as long as the configuration files we are talking of are architecture independent), the computer defaults/settings are stored in /etc and a per-user configuration in the users /home directory.

    As a per-user configuration is optional, why should there be a file in /home/[.*]/? I twould not make any sense to store something that is not needed or does nothing.

    More information about the unix filesystem hierarchy standard can be found around here: LINK.

    This standard is the main reason why I like unix.
    Last edited by Kloschüssel; 07-09-2010 at 07:19 AM.

  3. #3
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    ~/.vimrc only exists if you create it first

    you might also find /etc/vimrc, which would be global configuration

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2010
    Posts
    6
    Thanks for your answers.

    so, to sumarize, if I want to chage the global configuration of vim I must chage the vimrc in /etc/vim/ and if I want a personalized configuration for my user (that over write the global configuration) I must create a vimrc file in my home directory.

    I found that the file vimrc file in the directory /etc/share/vim is a link to the file in /etc/vim.

    again thanks for answer.

    I'm going to try to add some plugins to my vim.

  6. #5
    Just Joined!
    Join Date
    Jul 2010
    Posts
    6
    Quote Originally Posted by Kloschüssel View Post
    .

    This standard is the main reason why I like unix.
    Thanks for the think and for the link, this will clarify many questions I have.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •