Wednesday, January 26, 2011

Re: Vim path not working for me (On ".")

On Wed, Jan 26, 2011 at 01:42:23PM +0100, Jürgen Krämer wrote:
> Erik Christiansen:

> > But ":set path" shows it should work OOTB:
> >
> > path=.,./include,..,../include,/usr/local/include,/usr/include

...

> To search through the current directory you need to
> include an empty string in the path option, e.g.,
>
> path=,.,./include,..,../include,/usr/local/include,/usr/include
>
> (or
>
> path=.,,./include,..,../include,/usr/local/include,/usr/include
>
> if you want to search next to the current file first).

Many thanks Jürgen! The first work-around fixes the problem. :-)

I still don't understand why vim lists cwd ('.') in path by default, but
then fails to honour that declaration. This default distinctly seems to
be incorrect and misleading behaviour description in 'path'.

I'm sorry, but the purpose of the second work-around eludes me, so far.
But the first one already allows vim to search in cwd (i.e. "next to the
current file"), so I'm very happy with that.

Thanks again, for the work-around.

Erik

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: