Tuesday, November 1, 2011

Re: Cannot use gf to go to file, path seems set

On Tue, Nov 1, 2011 at 13:32, Dotan Cohen <dotancohen@gmail.com> wrote:
> On Tue, Nov 1, 2011 at 01:06, Gary Johnson <garyjohn@spocom.com> wrote:
>> The problem is that that last segment of the path name,
>> /includes/functions_misc.php,  begins with a "/" which Vim
>> understands to mean the beginning of an absolute path.  See
>>
>>    :help 'path'
>>
>
> i see, Gary, that makes sense. Is there any workaround? This is a huge
> (>80000 files) application, full of include()s and require()s.
>
> Thanks.
>
>

I have a similar situation at work, where stuff is compiled inside a
chrooted environment, yet editing happens outside, so full paths in
files are really relative when editing. What I do is to visually
select the path, excluding the initial slash, and then use gf, which
will work on the selected text only.

Perhaps there is a faster way to do this, I'd love to hear about it.

Regards,

--
Jacobo de Vera
http://www.jacobodevera.com
@jovianjake

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

Post a Comment