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

41430Re: weird 'rtp' problem

Expand Messages
  • Hari Krishna Dara
    Jul 2, 2003
      On Wed, 2 Jul 2003 at 11:03am, Bram Moolenaar wrote:
      > > >
      > > > 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.
      > > >
      > >
      > > For the matter of fact, the actual case is more complicated than this,
      > > and I don't use a relative path as the HOME path either. You can very
      > > well use /tmp/vim as the HOME path to start with.
      > >
      > > I tried the scenario again with "c:\tmp\vim" as the HOME diretory to start
      > > with and "c:\hari" as the new HOME directory (set from inside vimrc).
      > > The 'rtp' value after vim starts up:
      > >
      > >
      > Did you really use:
      > :echo &runtimepath
      > That matters, because ":set runtimepath" will shorten $HOME to "~" while
      > ":echo" doesn't do that.

      I didn't use :echo, I didn't know the difference. Using :echo does show
      "~" for the path component that is causing the trouble.

      > If you did use ":echo" then the problem is that you have an unexpanded
      > "~" in the option value, that won't work. If that is not the problem,
      > then I can't see anything wrong. "~/package/vim" is where your
      > "doc/tags" file is located, thus that _should_ work. But that "~/"
      > really must be the full path.

      Ok, that explains the problem. I looked into the doc about 'rtp' and
      didn't see anything mentioned about this. I think Vim is supposed to
      internally expand the "~" characters when they are used to :set 'rtp',
      but this is getting bypassed while doing the same using the :let
      command, which is what I am doing, so something like below will cause

      let dir='~/.vim'
      let &rtp = dir.','.&rtp

      This is either a bug that needs to be fixed or the doc needs to be

      > I still don't see what actually goes wrong, but it must have something
      > to do with changing the value of $HOME while starting up. That means
      > the value to which "~/" expands is not predictable.

      In the real case, I am not changing the HOME directory from vimrc, but
      I did it here just to simplify it in this reproducible case. The problem
      can be reproduced even without changing the HOME value.

      Thank you,

      Do you Yahoo!?
      SBC Yahoo! DSL - Now only $29.95 per month!
    • Show all 6 messages in this topic