←back to thread

538 points todsacerdoti | 4 comments | | HN request time: 0.9s | source
Show context
thom ◴[] No.44358560[source]
Every vim/tmux user has created an ad hoc, informally-specified, bug-ridden, admittedly probably quite fast implementation of half of Emacs.
replies(4): >>44358617 #>>44359133 #>>44361524 #>>44361551 #
1. b0a04gl ◴[] No.44358617[source]
vim+tmux setups usually lean on system primitives = pipes, files, signals, scrollback so the tooling tends to stay transparent across environments. that gives them an edge in portability and debugging, especially over ssh or in constrained shells. it's just lets your workflows shaped around different guarantees so natively, it naturally makes building your own vim config an obvious choice
replies(1): >>44359109 #
2. iLemming ◴[] No.44359109[source]
> especially over ssh

Emacs has TRAMP mode - stands for “Transparent Remote (file) Access, Multiple Protocol", it lets you:

- Edit files as if they were local: /ssh:user@host:/path/to/file

- Chain connections: /ssh:jumphost|ssh:target:/file for bastion hosts

- Access Docker containers: /docker:container:/etc/config

- Edit Kubernetes pods: /kubectl:pod:/app/settings

- Sudo seamlessly: /sudo::/etc/hosts or /ssh:host|sudo::/etc/config

- And even combine them: /ssh:server|docker:container|sudo::/etc/nginx/nginx.conf

What you get? Transparent integration - Dired, Magit, etc, they just work. There's no context switching - you stay in your configured Emacs environment. Your keybindings, packages, customizations remain the same. It's multiprotocol: Supports SSH, FTP, SMB, ADB (Android), and more.

replies(2): >>44374164 #>>44374220 #
3. onetom ◴[] No.44374164[source]
yeah, magit via TRAMP kinda works, just slow af: https://news.ycombinator.com/item?id=44356346

not really TRAMP's fault, of course...

it also doesn't quite work with macOS remotes usually.

again, not purely TRAMP's fault, but a default config and habits issue with ~/.zshrc vs ~/.zprofile and maybe /etc/sshd/config settings, i think. i hasn't fully figured it out yet.

using this kind of "full-screen terminal screen sharing" approach has a more predictable experience, because of the amount of data transferred is usually 1 screen worth of characters (and colors) max, on most keystrokes.

that's both a pro and a con.

it imposes a fixed, network connection dependent input lag and the output is also often redrawn by retransmitting the same data over and over again...

4. onetom ◴[] No.44374220[source]
i would have explicitly mentioned shell & eshell too.

ansi-term however doesn't work thru TRAMP, out of the box, though there are workarounds, like https://github.com/cuspymd/tramp-term.el (hasn't tried it yet)