views:

159

answers:

4

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

A: 

An officemate of mine used something like this a while back, but I've never tried it. I prefer to just ssh to the machine in question and fire up vim.

Have you seen this page? It seems to be what you're looking for.

The instructions on that page seem to be specific to Linux.
Marco
A: 

You don't say what protocol you're using to access the files via putty, but odds are that winscp will support what you want. Check out http://winscp.net

rlduffy
+2  A: 

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).

Aristotle Pagaltzis
A: 

Personally, when I need to do this; I open up a local gvim (A little speedier; I have had issues with x11 forwarding over WAN) and do

  :e ftp://<username>@<server>:/<fileToEditRemotePath>

You will have to authenticate each time; but works fine for quick edits. On linux; you can use scp rather than ftp; but I'm not sure how to setup the putty forward for that...(Most likely the netrw-putty answer above takes that into consideration, hence I am up voting it)

wom