Suramya's Blog : Welcome to my crazy life…

January 24, 2006

Editing remote files securely with vim

Filed under: Linux/Unix Related — Suramya @ 4:10 PM

This is something I will be using a lot. Now if the same thing works for emacs my life would be set…

To edit a file on the remote host, you would use the following command:

$ vim scp://suramya@remotehost//home/suramya/testfile

This will use scp to download the file, fire up vim locally to edit it, and upon saving the file, scp it back to the remote host. The basic syntax of the command is:

$ vim scp://user@host/[path_to_file]

Original Article: Editing remote files securely with vim


1 Comment »

  1. Tip: Doing this from an ssh-agent that has keys added makes it much better. Else you’ll end up trying password frequently.
    Other protocols are also supported. “:help netrw”

    My biggest gripe: [s]explore does not work with remote machines

    Comment by Anomalizer — February 1, 2006 @ 8:58 AM

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress