Once a remote buffer is opened in vim via, for example, vim scp://user@host/path/to/file.txt, pressing - to explore the enclosing directory no longer works.
This is due to the trailing / being stripped from the scp URL, leading to scp://user@host/path/to rather than scp://user@host/path/to/.
Typing :Explore does not cause this issue.
Interestingly, once the directory is successfully loading using :Explore, vinegar functions correctly.
This is still relevant.
Fix looks very simple: add '/' at the end after expanding '%:h'.
This makes it so netrw correctly opens directory for remote edits.
For local edits, it should make no difference.
Once a remote buffer is opened in vim via, for example,
vim scp://user@host/path/to/file.txt
, pressing-
to explore the enclosing directory no longer works.This is due to the trailing
/
being stripped from the scp URL, leading toscp://user@host/path/to
rather thanscp://user@host/path/to/
.Typing
:Explore
does not cause this issue.Interestingly, once the directory is successfully loading using
:Explore
, vinegar functions correctly.