Using GVim on Windows to edit remote Linux files?

Marco picture Marco · Jul 26, 2010 · Viewed 8k times · Source

Is it possible to use gvim to edit remote Linux files if I am running Windows?

To elaborate, I would like to connect to the Linux server via Putty and then use my local gvim instance to edit the files on the server -- Is this possible?

It seems x11 forwarding (via xming?) might be the solution but I cannot get it to work.

The remote server runs Debian; my local machine is Win7

Answer

Aristotle Pagaltzis picture Aristotle Pagaltzis · Sep 17, 2010

This should fix you up:

let g:netrw_cygwin = 0
let g:netrw_ssh_cmd  = '"C:\Program Files\PuTTY\plink.exe" -batch -T -ssh'
let g:netrw_scp_cmd  = '"C:\Program Files\PuTTY\pscp.exe"  -batch -q -scp'
let g:netrw_sftp_cmd = '"C:\Program Files\PuTTY\pscp.exe"  -batch -q -sftp'

See :help netrw-putty (and lots of scrolling around in that documentation page).