Hacker News new | ask | show | jobs
by chr15p 2881 days ago
Not just its launch time but its ubiquity, vi comes installed on pretty much every linux/unix machine no matter how minimal the install so if you are a sysadmin whose job involves jumping between machines a lot it makes far more sense to learn vi then install emacs everywhere. Its also the reason to use it without customization so you dont come to rely on a feature that isn't installed on that one machine with a critical problem

Developers tend to work on a single machine so can tailor it much more to their own preferences.

2 comments

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).
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.
That's true. In the eternal Vim vs. Emacs discussion, I found that preference is correlated to whether a particular person feels more like a ops/sysadmin, or more like a programmer. As you wrote, developers tend to work on a single machine, while sysadmins tend to jump between many machines.

I'm a developer, not a sysadmin, though I try to do most of my ops work via Tramp these days. I wish an actual sysadmin and Emacs user could chime in and say something about their workflow, and the problems they encounter.