Ivor O’Connor

August 8, 2013

Tutorial / Example VI Using SSH To Edit Remote Hosts

Filed under: howto, IDE, Linux, vi, vim — ioconnor @ 1:28 pm

Your local vi (gVim/Vim) with many of the settings you have painfully setup can be used to edit files on remote hosts. So you can keep your cool colors, most of your key bindings, and most of your tools. I say “most” because obviously your local copy does not have the same environment as the remote copy. If you try to hit the compile key it may not do what you expect. Same is true for your tags file.

:e scp://myusername@myserver/mydirectory/myfile

I have a list of files I routinely edit. So I edit that list of files putting that command on a line and then execute it from that line. Works wonderfully.  I do that by pressing ** over the line in question and having “:map ** “zyy:@z” that line in the equivalent of the ~.vimrc file.


It’s amazing how saving a few keystrokes makes things run so much more smoothly.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: