Hacker News new | ask | show | jobs
by krylon 2881 days ago
OTOH, emacs has TRAMP which allows you to edit files remotely, using ftp or ssh as the transport layer. (Okay, I do not use that feature often, and I do still use vi sometimes for quickly editing a config file or something).
2 comments

A normal sysadmin workflow would be, log in via ssh, poke at some log files, run a couple of commands, edit a config file, restart a service, check the logs again, logout. If you need to be ssh'd in anyway to run commands then being able to edit a file remotely is of limited value.

I actually really like emacs, for a while I used it as my login shell (no x-windows and with e-shell providing a command line), and elisp is an awesome tool (in theory if not always in practice), but when I moved into sysadmining and later consulting the practical issues meant vi was by far the best option.

> If you need to be ssh'd in anyway to run commands then being able to edit a file remotely is of limited value.

You can access the remote shell from TRAMP and run commands, just like you can access the local shell from Emacs on your local machine.

> A normal sysadmin workflow would be, log in via ssh, poke at some log files, run a couple of commands, edit a config file, restart a service, check the logs again, logout. If you need to be ssh'd in anyway to run commands then being able to edit a file remotely is of limited value.

eshell supports TRAMP: from an eshell, you can do something like 'cd /ssh:news@news.my.domain:/opt/news/etc' and then run `ls` &c., seeing the results you expect. You can run 'service restart innd' or whatever you'd like, it it runs remotely.

Yeah, emacs is pretty awesome.

Like I said, I don't use TRAMP very often.

The number of Unixoid systems I have to take care of is sufficiently small that installing emacs on all of them is no big deal. I usually start an emacs daemon after booting and use emacsclient to fire up an editor, which is almost instantaneously.

vim comes bundled with netrw, which lets you do the same thing.