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

41407Re: weird 'rtp' problem

Expand Messages
  • Bram Moolenaar
    Jul 1, 2003
    • 0 Attachment
      Hari Krishna Dara wrote:

      > I am modifying 'rtp' from my .vimrc and I find that it is causing trouble
      > in finding help files. Though a particular directory exists in 'rtp',
      > the help files under the doc directory are not found by the :help
      > command (and yes, I did run :helpt, actually several times). I could
      > even narrow it down to the following code in the vimrc. To reproduce it,
      > please do the following:
      >
      > - Go to a temp directory, say /tmp/vim.
      > - Set HOME to the current directory. Setting it to "." should suffice.
      > - Create .vimrc file with the following as the contents:
      >
      > let $HOME='c:/hari'
      > let $VIMPACKAGE='~/package/vim'
      >
      > " Remove unnecessary paths as we know where to find the files.
      > set runtimepath-=~/vimfiles
      > set runtimepath-=~/vimfiles/after
      > set runtimepath-=~/.vim
      > set runtimepath-=~/.vim/after
      > set runtimepath-=$VIM/vimfiles
      > set runtimepath-=$VIM/vimfiles/after
      >
      > let &runtimepath = $VIMPACKAGE . ',' . &runtimepath
      >
      > - Adjust the HOME directory to your actual home directory and
      > VIMPACKAGE to the directory containing plugin, doc etc.
      > (~/vimfiles or ~/.vim, make sure you use ~ instead of the fullpath).
      > - Now start vim.
      >
      >
      > As the HOME directory is the current directory, it should pick the .vimrc
      > that you just created. But since the HOME directory is modified to your
      > actualy home directory and the rpt contains this directory, you can
      > observe that all your plugins will be loaded as usual. But if you try to
      > get the help on any installed plugins, Vim says that the tag is not
      > found. You can verify that the directory exists in the 'rtp'. If you add
      > the directory again, then it seems to pick it up. Also, if you use the
      > full path in the directory instead of "~", then also it seems to pick it
      > up fine. This looks like a bug to me.

      This is a bit complicated to reproduce. What is the value of
      'runtimepath' after all this? Use this command:

      :echo &runtimepath

      Vim will search for "doc/tags" files in all directories in
      'runtimepath'. I can only imagine the value of 'runtimepath' is wrong.

      Note that using a value for $HOME that is not an absolute path is very
      unusual, this might cause trouble anyway.

      --
      ARTHUR: (as the MAN next to him is squashed by a sheep) Knights! Run away!
      Midst echoing shouts of "run away" the KNIGHTS retreat to cover with the odd
      cow or goose hitting them still. The KNIGHTS crouch down under cover.
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
    • Show all 6 messages in this topic