Last Updated: February 25, 2016
·
429
· ddeaguiar

Edit Remote Files with TRAMP

While perusing the mastering emacs blog, I learned about TRAMP. TRAMP allows you to easily edit remote files form your local emacs install. You open the remote file using the same find-file keybinding C-x C-f – with all the benefits of the file explorer and auto-complete. What awaits you is remote file editing bliss!

For example, to edit the foo.txt file in my home directory on my server www.example.com as the default user, I would do the following:

C-x C-f, followed by /www.example.com:foo.txt

Once done editing, use C-x C-s to save. Be sure to peruse the [TRAMP manual](TRAMP to learn more about it!