Loading ...
Sorry, an error occurred while loading the content.

68429Fixing "gf" ("goto file") to not be special-cased for netrw

Expand Messages
  • David Barnett
    Feb 23, 2013
    • 0 Attachment
      I tried setting up my own BufReadCmd autocmds for perforce depot paths (of the form "//depot/*") and found that trying to jump to those files with "gf" fails with this error message:
      E447: Can't find file "//depot/foo" in path
      I was confused why this worked for netrw and not for my script. Turns out vim has a special case to let anything through that looks like a netrw path.

      There's code in find_file_name_in_path() to accept anything with "://" in it. But really what should be accepted is anything that matches a BufReadCmd. In that case "foo://bar" would no longer be accepted as valid (since vim doesn't know how to open it) and my "//depot/something" would start being accepted on my machine (since I've taught my vim how to open it).

      Would that be acceptable?

      You received this message from the "vim_dev" 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_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.