The first and most basic tool of development is a text editor
suitable for modifying and writing programs.
Literally dozens of text editors are available under Unix;
writing one seems to be one of the standard finger exercises for
budding open-source
hackers. Most of
these are ephemera, not suitable for extended use by anyone other than
their authors. A few are emulations of non-Unix editors, useful as
transition aids for programmers used to other operating systems. You
can browse through a wide variety at SourceForge or ibiblio or any
other major open-source archive.
For serious editing work, two editors completely dominate the
Unix programming scene. Each is available in a couple of minor variant
implementations, but has a standard version you can rely on finding on
any modern Unix system. These two editors are
vi and Emacs.
We discussed them in Chapter13 as part of our discussion of the right
size of software.
As we noted in Chapter13, these two editors express sharply
contrasting design philosophies, but both are extremely popular and
command great loyalty from identifiable core user populations. Surveys
of Unix programmers consistently indicate about a 50/50 split between
them, with all other editors barely registering.
In our earlier examinations of vi and
Emacs, we were primarily concerned with
their optional complexity and the surrounding design-philosophy issues.
Many other things are worth knowing about these editors, both as a
matter of practicality and of Unix cultural literacy.
Useful Things to Know about vi
The name of vi is an abbreviation for
“visual editor” and is pronounced /vee eye/ (not /vie/ and
definitely
not /siks/!).
vi was not quite the earliest
screen-oriented editor; that palm goes to the Rand editor,
re
, that ran on Version 6 Unix in the 1970s. But
vi is the longest-lived screen-oriented
editor built for Unix that is still in use, and is a hallowed part of
Unix tradition.
The original vi was the version
present in the earliest BSD software distributions beginning in 1976; it is now obsolete. Its
replacement was ‘new vi’ which shipped with 4.4BSD and is
found on modern 4.4BSD variants such as BSD/OS, FreeBSD, and NetBSD
systems. There are several variants with extended features, notably
vim, vile,
elvis, and xvi;
of these vim is probably the most popular
and is found on many Linux systems. All the variants are rather
similar and share a core command set unchanged from the original
vi.
Ports of vi are available for the
Windows operating systems and MacOS.
Most introductory Unix books include a chapter describing basic
vi usage. One place a vi FAQ is available
is the Editor
FAQ/vi; you can find many other copies with a WWW keyword
search for page titles including “vi” and
“FAQ”.
[an error occurred while processing this directive]