Wednesday, January 26, 2011

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

Excerpts from Erik Christiansen's message of Wed Jan 26 11:50:29 +0100 2011:
> 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:

Also try gF. If this doesn't work you still can install
https://github.com/MarcWeber/vim-addon-goto-thing-at-cursor
(as always I recommend vim-addon-manager)

Use this to use 'gf' instead of the default mapping \gf
let g:config = { 'goto-thing-handler-mapping-lhs' : 'gf' }

The implementation always returns a list of possible file matches.
Then if a file exists its opened. If none exists a list is shown so that
you can select which file to edit.

Eg
does-not-exit.txt (then press \gf) will always run :e does-not-exist.txt

Marc Weber

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