I know Vim's gF can work on this pattern:


However, how can I tune gF to work with the slimv's cross-reference giving pattern:

swank.lisp line 1694


  • 1
    According to :help gF this should actually work: "" line " is also recognized, like it is used in the output of :verbose command UserCmd", and if I try it then it seems to work for me. What happens when you enter gF? Do you get an error? Also, what Vim version are you using? Jan 29 at 4:06
  • Thanks Martin. With the " line ", gF just opens the file without moving to the specific line. My Vim's version is VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 17:31:41) Included patches: 1-1453 Modified by pkg-vim-maintainers@lists.alioth.debian.org Compiled by pkg-vim-maintainers@lists.alioth.debian.org Huge version with GTK3 GUI.
    – fdxhuang
    Jan 29 at 6:18
  • It looks like this feature was added in Vim 8.2.0030 from Dec 2019; one way to make it work is updating your Vim to a more recent version. Otherwise the only option is override gF with some custom VimScript which implements this. Jan 29 at 7:45
  • Thanks very much, Martin. I update my Vim to the latest version and it works now.
    – fdxhuang
    Jan 29 at 9:03

As Martin notes in the comments, support for this was added in 8.2.0030 in December of 2019. An upgrade solves it.

Otherwise, you'll need to override gF with some vimscript.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.