Hi,
I've finally found out that netrw replaces colon with slash in path to a temporary file and inserts slash at the beginning of the path. Consequently, the content of remote file cannot be copied to local temporary copy over scp on windors.
Path to temporary file (tmpfile) is modified here:
I have no idea when the path substitution helps but it may be really annoying when you use scp utility and its directory is added to PATH environmental variable.
let g:netrw_scp_cmd = 'scpg3.exe -q' " Tectia Client
It works when you undo substitutions in temporary file path.
Insert this line in autoload/netrw.vim file in if statement after substitution.
let tmpfile_get = tmpfile
but it's probably better to modify the condition in if statement...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
Same issue here.
Reproducing:
:edit scp://host//linux_pathscp /linux_path /windows_path/C/Users/me/AppData/Local/Temp/nonce.file—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Another workaround is change:
To:
if g:netrw_scp_cmd =~ '^scp' && (has("win32") || has("win95") || has("win64") || has("win16")) && !has("gui_running") let tmpfile_get = substitute(tr(tmpfile, '\', '/'), '^\(\a\):[/\\]\(.*\)$', '/\1/\2', '') else
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Encountered this exact issue on Windows, LKI's solution worked for me. Is there a way to solve this without editing autoload/netrw.vim? For example, is there a way to apply this hotfix from my user's vim configuration so I can put it under version control?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
ping @cecamp
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
The discussion at #5199 seems to be related
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()