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

33896Re: vimfiles?

Expand Messages
  • Benji Fisher
    Nov 2, 2002
      Denis Perelyubskiy wrote:
      > * <mxgl@...> [30-Oct-02 01:34 -0800]:
      > >
      > >What exactly is the vimfiles directory to be used for?
      > 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

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

      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
    • Show all 2 messages in this topic