Edit remote files over SSH / SCP using GVim

GVim, one of the graphical versions of vim for X11, has a handy feature … you can edit remote files over ssh. Launch GVim, and issue the command:

:e scp://username@someremotehost/./path/to/file

where username is your username on the remote server, someremote host is the hostname or ip of the server and /./path/to/file is just that … the path to the file on the remove server. Everytime you save with :w, the changes get transfered.

When used in combination with ssh-keys to avoid typing your password every time, this can make editing remote files really quick and easy.

3 thoughts on “Edit remote files over SSH / SCP using GVim

  1. Pingback: vim over ssh

Leave a Reply

Your email address will not be published. Required fields are marked *