Archive for the ‘Vim’ Category.

Vim + netrw Problem

While modifying a remote file with netrw under Windows I ran into a problem upon trying to write the file.

scp -q "VIMD72e7.tmp" "host:/path/to/file.txt"
VIMD7E7.tmp: No such file or directory
shell returned 1
Hit any key to close this window...

I think that this is a result of the autochdir option being set. My fix is to do a

:lcd $TEMP

in the buffer with the remote file loaded prior to writing the file. This lets scp find the temporary file and the copy/write succeeds.

[Digg] [Reddit] [DZone]