I like having netrw loaded for browsing directory contents when I open
'.' and for downloading webpages when I
split http://host/path, but it's really getting in the way of opening files with
^wf when netrw doesn't understand the protocol.
I'm editing a sizable library of Salt statelists for a project, and they have a lot of Salt filesystem URLs in the configs (
salt://path/path/file) that I'd like to be able to split into with
^wf. There's no hope for netrw understanding these as built-ins, which is acceptable. Some local config would be required to explain to vim where the files really are.
I'd like a local config to teach netrw to open them or some other method of bypassing netrw so I can open them.
I tried to use:
set includeexpr=substitute(v:fname, "salt://", "location/of/file_root/").
It took me quite a while to figure out
includeexpr was never being applied. What seems to happen is that netrw handles the URL, decides it's a filename, and fails to execute
What are my options here? disable netrw in
BufEnter for files I'm likely to see the salt urls? preemptively fire
includeexpr before netrw can get to it? Also, where would you set events that happen before netrw fires?