Wednesday, January 26, 2011

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

When I have a full pathname in a file, then gf works fine.

But given only the filename of a file in the current directory, vim
complains "E447: Can't find file xxx in path"

If I prefix each filename with a superfluous "./", then gf works fine.
But ":set path" shows it should work OOTB:

path=.,./include,..,../include,/usr/local/include,/usr/include

so I was wondering if my ancient vim is only nearly perfect:

$ vim --version
VIM - Vi IMproved 7.1 (2007 May 12, compiled Jan 8 2009 02:18:41)
Included patches: 1-138
Compiled by buildd@rothera.buildd
Huge version with GTK2-GNOME GUI.

Shriek, horror, that's barely from the century of the fruitbat. Let's
update immediately. Unfortunately, although an apt-get update, followed
by an apt-get install vim, did a:

Get:1 http://au.archive.ubuntu.com hardy-updates/main vim 1:7.1-138+1ubuntu3.1

The "vim --version" output hasn't changed one iota.

I'm on "Ubuntu 8.04.4 LTS", so perhaps can't expect the latest vim to
come without more effort.

Before I go and build vim from source, am I doing something wrong, thus
stopping the old vim actually honouring the "." in path? (Google doesn't
seem to think anyone else has the problem, and the vim.org documents
seem to agree.)

Erik

--
I frequently hear "it's not rocket science, is it?". No, but I recently saw a
slide of the infamous "O rings" which failed on the Challenger shuttle. Under a
layer of frost, you can just read "Do not use in temperatures below 16C". So
even rocket science is not rocket science. - User feedback on BBC website

--
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: