Loading ...
Sorry, an error occurred while loading the content.

Re: ~/.vimrc under windows

Expand Messages
  • Andrew Stryker
    ... Hello there - ... Vim help (:h vimrc) says: Recommended place for your personal initializations: Unix $HOME/.vimrc OS/2 $HOME/.vimrc or
    Message 1 of 5 , Jan 3, 2005
    • 0 Attachment
      Neil Zanella <nzanella@...> wrote on 2005-Jan-03:
      > Hello,

      Hello there -

      > I would like to know where to place my personal .vimrc when using gvim
      > under Windows and where I should place it.

      Vim help (:h vimrc) says:

      Recommended place for your personal initializations:
      Unix $HOME/.vimrc
      OS/2 $HOME/.vimrc or $VIM/.vimrc (or _vimrc)
      MS-DOS and Win32 $HOME/_vimrc or $VIM/_vimrc
      Amiga s:.vimrc or $VIM/.vimrc


      All that means is use your home directory. One way to find out
      which directory is home directory is to type

      echo %HOME%

      at a command prompt. The screen should echo something like:

      c:/Documents and Settings/neil

      And that is your home directory.

      > Thanks,
      >
      > Neil

      Andrew
      --
      He looked at me as if I was a side dish he hadn't ordered.
    • panshizhu@routon.com
      find where your HOME (i.e. your path to the %HOME% environment variable) lies, and place your .vimrc into your HOME directory. If you do not know how, try Run
      Message 2 of 5 , Jan 3, 2005
      • 0 Attachment
        find where your HOME (i.e. your path to the %HOME% environment variable)
        lies, and place your .vimrc into your HOME directory.

        If you do not know how, try Run cmd.exe, then type
        echo %HOME%

        to find where is your HOME, you can change the HOME in Computer settings.

        --
        Sincerely
        Pan, Shizhu. ext: 2221




        Neil Zanella <nzanella@...> wrote on 2005-01-04 11:15:52:

        > Hello,
        >
        > I would like to know where to place my personal .vimrc when using gvim
        > under Windows and where I should place it.
        >
        > Thanks,
        >
        > Neil
      • Mathias Michaelis
        Hello Neil ... I think the best way is to open vim or gvim and then type ... On the other hand, if you open a dos or cmd window and then type `echo %HOME%´,
        Message 3 of 5 , Jan 4, 2005
        • 0 Attachment
          Hello Neil

          > I would like to know where to place my personal .vimrc when using
          > gvim under Windows and where I should place it.
          >
          I think the best way is to open vim or gvim and then type

          :echo $HOME

          On the other hand, if you open a dos or cmd window and then type
          `echo %HOME%´, as others have suggested, you may get the stupid
          output `%HOME%´ only, because %HOME% may not be defined. However,
          within vim or gvim the $HOME variable is always defined somehow (as
          %HOMEDRIVE%%HOMEPATH% if %HOME% is not defined, else as %HOME%)

          I use to place my personal vimfiles directory also to the place that
          vim shows by `:echo $HOME´. Within the vimfiles directory you can
          put personal plugins, syntax color definitions etc.

          I hope that helps.
          Regards
          Mathias
        • Antoine J. Mechelynck
          ... Neil: On any platform, :version will tell you where your particular version of (g)vim looks for startup scripts. Use the method above to evaluate any
          Message 4 of 5 , Jan 7, 2005
          • 0 Attachment
            Mathias Michaelis wrote:
            > Hello Neil
            >
            >> I would like to know where to place my personal .vimrc when using
            >> gvim under Windows and where I should place it.
            >>
            > I think the best way is to open vim or gvim and then type
            >
            > :echo $HOME
            >
            > On the other hand, if you open a dos or cmd window and then type `echo
            > %HOME%´, as others have suggested, you may get the stupid output
            > `%HOME%´ only, because %HOME% may not be defined. However, within vim or
            > gvim the $HOME variable is always defined somehow (as
            > %HOMEDRIVE%%HOMEPATH% if %HOME% is not defined, else as %HOME%)
            >
            > I use to place my personal vimfiles directory also to the place that vim
            > shows by `:echo $HOME´. Within the vimfiles directory you can put
            > personal plugins, syntax color definitions etc.
            >
            > I hope that helps.
            > Regards
            > Mathias
            >

            Neil:
            On any platform, ":version" will tell you where your particular version
            of (g)vim looks for startup scripts. Use the method above to evaluate
            any environment variables in the answers. Note that if a filename
            starting with an underline is not found, the same name is searched again
            with an initial dot instead (and vice-versa on Unix-like systems).

            Mathias:
            The reason why the vimfiles directory is there is because, as you
            probably know, that's where the default for the 'runtimepath' option
            (q.v.) puts it. Under Unix it is called $HOME/.vim rather than
            $HOME/vimfiles but the system-wide equivalent (for customizations that
            didn't come with the Vim distribution) is still $VIM/vimfiles .

            HTH,
            Tony.

            P.S.: Sorry if I sound pedantic: I'm a retired lower-high-school teacher
            and sometimes it shows.
          Your message has been successfully submitted and would be delivered to recipients shortly.