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

Re: vimfiles?

Expand Messages
  • Denis Perelyubskiy
    hello, ... vimfiles is directory which overrides the corresponding files in runtime , or adds the ones that are not present. convenient way to keep your
    Message 1 of 2 , Oct 30, 2002
    • 0 Attachment
      hello,

      * <mxgl@...> [30-Oct-02 01:34 -0800]:
      >
      >What exactly is the vimfiles directory to be used for?
      >
      >I have vim intstalled on two Win-machines, as I now found out,
      >on the first the vimfiles directory is empty, on the second its a duplicate of
      >the vim/vim61/ directory and the $VIMRUNTIME
      >correspondingly points to vim/vimfiles/.
      >
      >What is the "normal" behaviour, what is "vimfiles"
      >normally supposed to store?

      vimfiles is directory which "overrides" the corresponding
      files in 'runtime', or adds the ones that are not present.
      convenient way to keep your modified files and plugins.
      for example, if you have vimfiles/plugin/myplug.vim and
      $VIMRUNTIME/plugin/myplug.vim, the one in vimfiles is
      loaded. Directory structure under vimfiles should indeed
      mimick that under $VIMRUNTIME

      :help runtimepath

      denis

      --
      // mailto: Denis Perelyubskiy <denisp@...>
      // icq : 12359698
      // PGP : http://www.cs.ucla.edu/~denisp/files/pgp.asc
    • Benji Fisher
      ... [snip] ... It often amounts to the same thing, but I see it a little differently. The $VIM vimfilel directory (DOS) and the $HOME/.vim/ directory (unix)
      Message 2 of 2 , Nov 2, 2002
      • 0 Attachment
        Denis Perelyubskiy wrote:
        >
        > * <mxgl@...> [30-Oct-02 01:34 -0800]:
        > >
        > >What exactly is the vimfiles directory to be used for?
        [snip]
        >
        > vimfiles is directory which "overrides" the corresponding
        > files in 'runtime', or adds the ones that are not present.
        > convenient way to keep your modified files and plugins.
        > for example, if you have vimfiles/plugin/myplug.vim and
        > $VIMRUNTIME/plugin/myplug.vim, the one in vimfiles is
        > loaded. Directory structure under vimfiles should indeed
        > mimick that under $VIMRUNTIME
        >
        > :help runtimepath

        It often amounts to the same thing, but I see it a little
        differently. The $VIM\vimfilel\ directory (DOS) and the $HOME/.vim/
        directory (unix) are for any customizations that should not be
        over-written when upgrading to a new version of vim.

        The question of which file overrides which is a little
        complicated. For example, on my W95 machine, 'runtimepath' includes the
        directories

        D:\VIM/vimfiles (a.k.a. $VIM\fimfiles)
        D:\VIM\vim61 (a.k.a. $VIMRUNTIME)
        D:\VIM/vimfiles/after

        in that order, which determines search order. Now, if I use :runtime,
        then the first file found is used; it overrides the other(s). If I use
        :runtime!, however, all found files are :source'd, so the last one found
        overrides the others. (This is why we have the after/ directory!) Some
        files check for the existence of a variable; if it exists, they bail
        out. In this case, first file wins again.

        As I said, a little complicated.

        :help :runtime
        :help ftplugin-overrule

        HTH --Benji Fisher
      Your message has been successfully submitted and would be delivered to recipients shortly.