edit files remotely: emacs + tramp

Suppose I want to edit a file remotely. I don’t want to download/ftp the file to my computer, edit, and send it back to the remote server. In emacs, I can edit it remotely using tramp via the ssh or rcp protocol. Put following in the .emacs file after installing tramp.

<pre class="src src-sh">;; tramp stuff

;; http://ubuntuforums.org/showthread.php?t=760038 (require ‘tramp) (setq tramp-default-method “ssh”)

Read a remote file by C-x C-f /user@your.host.com:/path/to/file. Note we Need that ‘/’ before username. This is a good reference for tramp.

About Vinh Nguyen

Statistician

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>