One of the aspects of working on Unix which you'll have to deal with pretty early in your contact with it, is which editor to use. An editor is the tool you use to create your documents or programs. It's the tool you'll use more than any other.
It's very much a personal decision, which editor you use, and when you're feeling understimulated, you can discuss the matter with your officemates (don't get blood on the machines, though, and remember to wash and dry your thumbscrews carefully after use -- you'll need them again when you discuss programming languages -- see Section 2.4).
SUN/170, Editors on Unix, is an overview of some of the available options, listing their good and bad points. In addition to this, Brian McIlwrath wrote an overview of available text editors in the September 1998 (issue 21) edition of the Starlink Bulletin.
Emacs is many people's favourite (and mine). You can do
just about anything in emacs -- it's a hugely productive
environment -- but you may get cricks in your fingers from
the odd key combinations. Emacs itself can help you up the
long learning curve: there's a very good tutorial built-in
to emacs, and available by typing C-h C-t
(that's control-H, control-T), plus extensive documentation
behind C-h C-i
. Leave emacs with C-x
C-c
(obvious, really).
Vi is another favourite. It is indeed very powerful, but rather more of an acquired taste. An advantage of vi is that it's small, and therefore quick to start up -- this makes it useful if you want to make a quick change to a file, or make similar changes to a number of files, and it makes it useful as a editor for Pine, or any other mail program. An even bigger advantage of vi, however, is that it's available on every Unix system since the Ark, so if you can use vi, you can work on whichever Unix system you find yourself. The main disadvantage is that it is exceedingly unintuitive. There's quite a lot of help available for vi (it needs it, after all), but not, oddly enough, in the manual page, which describes in elaborate detail how to start up vi, but not what to do once you succeed. You'll find a good introduction to vi in Chapter 6 of the Solaris 2.6 Advanced Users' Guide, and in Chapter 2 of the old SunOS 4 Documentation Tools manual, and probably in the corresponding manual for any other Unix you use (don't worry about these being out of date, by the way, vi doesn't change much...). Online introductions to, and references for, vi include the the unixhelp manual, vi101, and even the vi-lovers home page!
If you want to leave vi without saving what you've
(accidentally?) typed, you can do so by typing
:q!
(if it beeps at you, or if those characters
simply appear in the typing buffer on screen, try pressing
escape once or twice first). By the way, it's pronounced
`vee-eye', not `vye': pronounce it the wrong way and you'll
lose all your credibility (of course, if you know the
correct way to pronounce it, you'll lose all credibility
with a different set of folk -- your choice).
For VMS fans, there's jed
, which is a simple
and fairly sane editor which includes an emulation of the
EDT editor of old. It's available on Starlink systems, and
documented in SUN/168.
Finally, there's pico
, the editor used
internally by the pine mailer. You can't go wrong with this
one, but I'd imagine it could be a little painful if you're
writing much code with it. Along the same lines, the
textedit
editor which comes with OpenWindows
really isn't up to much. It looks pretty, but has zero
support for programming. You'll be using an editor a
lot, so it's worth investing time to learn to use a
powerful one to its full extent.