Friday, February 19, 2016

Re: gF doesn't work with latest vim on Windows

On Friday, February 19, 2016 at 9:52:51 AM UTC-6, DrChip wrote:
> Ben Fritz wrote:
> > On Thursday, February 18, 2016 at 11:09:34 AM UTC-6, andalou wrote:
> >> If I use "set isfname-=:" gF works, but "{visual} gF" doesn't work!
> >> I get the same error:
> >>
> >> E447: Can't find file "main.c:26" in path
> >>
> > That's because {visual} gF doesn't pay any attention to line numbers, and visually selecting a file name is designed to let you find files whose characters may not be automatically recognized by Vim (e.g. spaces, or if you've removed ':' from isfname and want to go to a file containing one anyway).
> >
> > :help v_gF
> > {Visual}[count]gF Same as "v_gf".
> >
> > :help v_gf
> > {Visual}[count]gf Same as "gf", but the highlighted text is used as the
> > name of the file to edit. 'isfname' is ignored.
> >
> Another way to say that -- use v or ctrl-v to do your visual selecting,
> not V.
>
> Regards,
> Chip

I think that the confusion was that v_gF should logically do what gF does in normal mode; edit the file AND jump to a line number. It's confusing that v_gF is instead the same as v_gf, and just edits a file.

Is there a good reason for that discrepancy?

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment