Skip to main content
2 of 5
Not yet excluding my env

NetRW bug? : vim scp://host1/filepath scp://host2/otherfilepath only opens first file

There is some strange behavior to observe in the current version of NetRW shipped with Debian Jessie (current as of Mid-2015) on my installation. Searching online doesn't immediately reveal other reports, or a known bug/existing patch. I'm currently not yet excluding my environments, or that this is documented behavior. Haven't found that yet though.

When I attempt to open 2 or more files with vim on different remote servers, only the first one gets opened successfully, concerning the other(s) I get a [New Directory] message. I switch command-line parameter sequence, the other one opens successfully.

Example:

vim scp://host1/filepath1 scp://host2/otherfilepath2 ==> First file opens, but second file is blank

vim scp://host2/otherfilepath2 scp://host1/filepath1 ==> Behavior consistent: Opening other files than first fails.

On top of it, both fail, if I also specify a local file first:

vim local/fi.le scp://host2/otherfilepath2 scp://host1/filepath1

Following variant at least opens the first scp-file and the local file:

vim scp://host2/otherfilepath2 local/fi.le scp://host1/filepath1

I stumbled upon this, when I was testing some edge cases in a solution/hack I was proposing as an answer to a question about Filename Completion for Remote Files

Am I the only only experiencing this, or wondering about this behavior?