vi has become my sysadmin's editor
Here is one of my little peculiarities: for all that I use it a lot, I
don't really like
vi. I use two or three editors on a routine basis
(and at least one more every so often), and out of all of those,
is my least favorite. But it is also the editor that I use the most,
because over time it has become what I'll call my sysadmin editor.
Why I have drifted into using vi all the time is a roll call of its
virtues as a sysadmin editor. First, it is ubiquitous; if I am on some
random, un-customized system, I know that I can type
vi and get
something usable. Second,
vi works in minimal environments, in that it
doesn't need X, and will thus work fine over basic ssh connections and
on the console (either normal or serial). Finally,
vi starts fast.
You are probably laughing at the last advantage, but it matters a lot in a sysadmin's editor because of two factors: sysadmins make lots of little edits to separate files, and we do this on a bunch of different machines and accounts. An editing environment that takes ten seconds to initialize is appreciably less useful than an one that starts in under a second, because those ten seconds can be an appreciable portion of the time I'm going to spend in this editing session.
This usage profile is basically completely opposite that of most people, who edit the same things for a long time in a single, well developed and customized environment. Which is why, for me, vi is a great sysadmin editor but not my favorite editor; in any environment besides sysadmin editing, its relative weaknesses start showing up more and more.
(Despite this, because I've used
vi so much for quick sysadmin
editing jobs I've wound up drifting into it more and more for casual
but more extended editing. It's usable enough (and I know it well
enough) for such editing, and it's often just enough of a pain to fire
up a better editing environment that I don't bother. Thus I wind up
doing things like dashing off quick email messages or even writing
WanderingThoughts entries with it.)
Sidebar: Why sysadmins don't just leave a big editor running
The usual big editor retort to the slow start problem is 'just start the editor once', but that doesn't work for sysadmins because we edit files in lots of different contexts. An editor for every context is an unfeasibly large number of them, and that assumes I am willing to leave editors running as root just in case I need them again, which I'm not (like most sysadmins, I get out of privileged contexts as fast as possible). Some editors try to let you access files on other systems with other logins, but this is infeasible for sysadmins for various reasons (including that I am not going to trust any editor with our root password).