Skip to main content
3 of 5
Added symptoms when running with '-u NONE -U NONE -N'

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

Running with all local customizations disabled as described in detail here: vim -u NONE -U NONE -N scp... creates buffers for all files, but all remote file buffers are empty.

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?