Hacker News new | ask | show | jobs
by aaronem 4101 days ago
Learn about Tramp, and for tasks complex enough to need a proper editor, you can edit those files in the same Emacs session you use for everything else. That's what I do with my RPi, for example -- it can pipe edits over an ssh session, so anything with an SSH server is eligible. (Revisiting this comment, it occurs to me to add that all my editing on my main machine is done this way. I play a game or two sometimes, so it runs Windows, but I run Emacs in a Linux VM and edit, in full X11-powered, keyboard-unfettered splendor, via transparent SSH authentication with the Windows host.)
1 comments

Tramp is terrible. Sshfs is better. I don't think it's hard to think of situations where those options aren't as practical as popping open an editor on the command line that you're on.
> Sshfs is better

In my experience it highly depends on the editor. With Sublime Text 3 on OS X, each keystroke is delayed by SSHFS' latency. It's a pain.

Tramp transfers the files back and forth, always working on a local copy (if I remember correctly). It provides a better experience.

Tramp’s experience gets better when you configure Emacs to keep autosave files somewhere other than alongside their parent in the same directory - unlike the file you’re actually editing, which is indeed only transferred on save or revert, the autosave file is updated very frequently, and this can be painful over a slow link. Keeping autosave files under ~/.emacs.d/auto-save or similar solves that problem; if you can configure Sublime to do something similar, it might improve the experience there as well.
This is a good point about tramp.
I use tramp for minor config file editting, it's not too bad. But when coding remotely, I like to setup 2 copies of code, one local, one remote. I always work on the local copy, then when I need to build, I use rsync to push the local code to the remote server for building remotely (because only the remote server has the os/compiler/cpu resources). It works great😁