Open justinmk opened 9 years ago
Actually, vim-fetch is not using Vim’s gF
(it uses gf
to fetch the file, then manages the jump on its own). The errors happen independently, albeit for the same reason: foo.py:46
is misidentified as the file name to search for.
In the case of the plugin this seems to be due to an error in the jump pattern regex. I’ll try to get to the root of this as soon as I am at my machine again, which might not be in the next few days, though – sorry about that.
Just to confirm something before I get to investigate further: what is the output of
:echo expand('<cfile>')
at the problematic position?
Output is
foo.py:46
(lacks the trailing colon)
The output of the same command on my system is
foo.py
which would indicate that gF
fails because your &isf
includes :
, either because your are on Windows (that would be a new one, I had you pegged as an OS X user ;)), or that you / one your plugins added :
to that (default on *nix systems is @,48-57,/,.,-,_,+,,,#,$,%,~,=
). If that is the case, the root bug is that I failed to account for how the value of isf
could overlay the jump pattern when getting cfile
; I might have to catch E447
and parse out possible jump patterns to handle this. Could you confirm that for me by giving me the output of
:echo &isf
please?
I’m not sure why :edit foo.py:46:
should fail, however; in my test, both the form with and without the trailing colon work fine, independently of any isf
setting (unsurprisingly, I should add, as the pattern detection is independent of Vim file name detection in that case). Could you give me some more details about how it fails exactly? If there is no error message, try logging the output of
:16verbose edit foo.py:46:
to verbosefile
and uploading that somewhere for me to see?
gF fails because your &isf includes :, either because your are on Windows (that would be a new one, I had you pegged as an OS X user ;)),
Yes, I was on Windows :) I use all of win/osx/unix on a regular basis. I'll try to isolate it when I get back to a Windows machine.
No need to confirm the value of isf
if you were on Windows – the default there includes :
. I’m still very much interested in the exact error / log of the :edit
failure, however. In your own time, I’m unlikely to be able to get back to this before next weekend anyway :).
@justinmk I am at long last getting to handling this (turns out it necessitates a lot of refactoring to solve cleanly). Watch out for release 2.1.
@kopischke Worth the wait ;)
I start to use Windows os. in my plugin flygrep, I get same error, and I have fixed it. so I will do it here.
I'm also very interested in the status of this issue. What's the problem with the fix/gf-isfname
branch?
Using the default vim-fetch settings,
gF
onfoo.py:46:
in the following text fails for me (Vim 7.4.618):Error:
Yet
:edit foo.py:46
does work.But
:edit foo.py:46:
(with colon at the end) fails. These also fail:If I unmap
gF
so that the default VimgF
is used, it also fails with the same error. I'm guessing this is the problem, but since:edit foo.py:46
works, why can'tfetch#cfile()
work also, instead of using Vim's broken thing?