3 ms·
I used to use lightweight editors on small systems like vi (not vim, the smaller vi). But when I discovered emacs tramp mode, I sort of got away from that. em
by m463 7y ago
I used to use lightweight editors on small systems like vi (not vim, the smaller vi).
But when I discovered emacs tramp mode, I sort of got away from that.
emacs comes with tramp mode built-in and allows you to edit a file on even very small embedded devices using only ssh.
I think it might work on telnet or other protocols, but I've never tried them.
for example
emacs /ssh:foo:/etc/bar.cfg
where ssh is the protocol, foo is the machine name and /etc/bar.cfg is the file on foo to edit.
or
emacs /ssh:user@host:.profile
- smitty1e 7y agoThe syntax for tramp-mode is on the arcane side.
- m463 7y agoI mostly use emacs /ssh:ab:.bashrc which I think compares favorably with ssh ab emacs .bashrc (or anything with a URL) my .ssh/config contains a "Host ab" section for particulars about logging into the machine. Although you have a point. For instance there is a weird bug or two in tramp mode, like (absolute-file-p "/ssh:ab:.bashrc") erroneously returns t
- TeMPOraL 7y agoWhat's arcane in /[protocol]:[login]@[machine]:[path to remote file]?
- dan-robertson 7y agoThe thing which I wish was easy is having ssh pass enough things forward (and backward) that you can ssh somewhere, run emacsclient on a file and have that file show up (via tramp) in your emacs. It’s just about possible but hard and hacks and not really supported by ssh.