My little vi page
As a tip of the hat to the editor that has created nearly all of
my Web pages (not to mention some of my code, parts of most of my
papers, and all of my email), here's a quick reference to that
most ubiquitous and speedy of all
Unix editors (now
also available for Windows and Mac users) ... the touch-typist's
friend ... the editor that don't get no respect ...
vi.
[There used to be an image here, but the estate of Charles Atlas
complained. Sigh....]
There's not much here at the moment:
- Here's the man page
from a Solaris 2.x system.
- Unix is a
Four Letter Word ... and Vi is a Two Letter Abbreviation is a
good basic introduction to those two tools.
- UUNet maintains a mirror of a helpful list of vi reference
documents:
the vi archive
index. The UUNet index file doesn't include links,
unfortunately; if you want to get the documents themselves, go
elsewhere in UUNet's FTP archive:
- At the University of Michigan,
Kent
Nassen maintains
a
hyperlinked version of the vi archive index which is a lot more
convenient. Note, however, that Nassen's site isn't an
"official" mirror of the main site
(ftp://alf.uib.no/pub/vi/ at
the University of Bergen).
- Kent Nassen also maintains
his own
vi page which is a whole lot more comprehensive than mine. I
especially recommend that you read his "short
description," which is more of an explanation for why people
swear by this initially arcane-sounding and archaic-looking
non-WYSIWYG editor. The short answer: it starts fast and you only
need a keyboard.
- And then there's Thomer
M. Gil's VI LOVERS
HOME PAGE (capitals his, not mine), which is both comprehensive
and fun.
- Here's
the Vim
reference page (Vim stands for "Vi IMproved," though this
Luddite--er, purist, isn't convinced that vi needed to be
improved...).
Vim seems to be, depending on your frame of reference, vi
The Next Generation, vi++, vi on steroids, or
Yet Another Crippled Competitor to
Emacs. I haven't
had occasion to use it yet, but perhaps if I run
OpenBSD, I will.
Vim was created by Bram Moolenaar; the Vim pages are by
Sven Guckes.
Antonio Valle designed
the
image.
The Vim pages also contain a gallery of images taken from various
vi-derived editors on many platforms, including Wintel and
the Macintosh. Vim itself is
getting a toehold in
the Windows world.
Reasons I use vi
- I don't want my quick and dirty editing job's duration to
be dominated by my editor's startup time.
- I've (mostly :-) mastered the admittedly arcane syntax
for regular expressions in searches and replacements.
(vi is not the problem here, BTW: regular expression
syntax is just plain ugly no matter what tool you're using.)
This is incredibly useful, especially if you understand
exact-word delineation, that is, how to search for
"struct" without getting "structure," for
example.
- Shiftwidth: indentation without the occasional fussiness
and stubbornness of indent-mode in Emacs.
- Single-key parenthesis- and brace-matching (see the final
thought, below) via the percent key.
- You seldom need to tie up multiple fingers at one time,
avoiding "Emacs pinkie."
- For these and other reasons, it's an unparalleled tool for
composing and editing email. I frequently revert to elm, with
vi replacing the built-in editor, to send complicated
text messages because the sorry excuse for a composing tool in
the fancier email app I use (which shall remain nameless)
isn't flexible enough.
I don't doubt you can get around the problems I've noted, and that
there are appropriate counterparts for the desirable functionality
I've cited, in Emacs. It's just so much more straightforward to do
these things in vi. The simpler tool is often the handier
one.
Final thought
(courtesy of Larry Wall)
When in doubt, parenthesize. At the very least it will let
some poor schmuck bounce on the % key in vi.
I am responsible for this WWW document. To report general
problems, email
<webmaster@www-itg.lbl.gov>.
This document and its use are subject to LBNL's
disclaimers and
legal notices; the legal notices include LBNL's privacy and
security guidelines.
Credits