Friday, November 8, 2013

Re: Strange/useless/misleading "error" with "gf"

Tim Chase wrote:

> To replicate:
>
> 1) start a clean Vim:
>
> vim -u NONE
>
> 2) read in a directory listing with the side-effect of marking the
> current buffer as modified
> :r! ls " *nix
> :r! dir /b " Win32
>
>
> 3) position the cursor over a filename that can be identified by
> 'isfname'
>
> 4) type "gf" to go to that file
>
> 5) As expected, Vim gives an E37 error that the file has been modified
> (because it was in step 2). However, the message here suggests that I
> might want to "add ! to override". I'm not sure how one adds an "!"
> to the "gf" command. :-)
>
> (yes, I know I could use ":e!" and pull down the filename)

Yes, that error message is confusing. I'll make a patch to improve
that.

--
The most powerful force in the universe is gossip.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
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/groups/opt_out.

No comments:

Post a Comment