Sure, vi is friendly. It's just particular about who it makes friends with.
Being the "standard" UNIX screen editor since at least 1980 has enshrined vi firmly in UNIX culture.
vi helped build UNIX, and UNIX in turn built the foundation for today's Internet. Thus, it was inevitable that there be at least one Internet web site devoted to vi. This appendix describes some of the vi resources that are available for the vi connoisseur.
Where to start: There is surely no activity with more built-in obsolescence than publishing World Wide Web sites in a printed book. We have tried to publish URLs that we hope will have a reasonable lifetime.
In the meantime, the "Tips" section of the elvis documentation lists interesting vi-related web sites (that's where we started), and the USENET comp.editors newsgroup is also a good place to look.
There are two primary vi-related web sites, the vi Lover's Home Page, by Thomer M. Gil, and the Vi Pages, by Sven Guckes. Each contains a large number of links to interesting vi-related items.
The vi Lover's Home Page can be found at http://www.thorner.com/thorner/vi/vi.html. This site contains the following items:
A table of all known vi clones, with links to the source code or binary distributions
Links to other vi sites, including the Vi Pages, by Sven Guckes
A large number of links to vi documentation, manuals, help, and tutorials, at a number of different levels
vi macros for writing HTML documents and solving the Towers of Hanoi, and ftp sites for other macro sets
Miscellaneous vi links: poems, a story about the "real history" of vi, vi versus emacs discussions, and vi coffee mugs (see below)
There are other things there too; this makes a great starting point.
The Vi Pages can be found at http://www.math.fu-berlin.de/~guckes/vi. This site contains the following items:
A detailed comparison of options and features among different vi clones
Screen shots of different versions of vi
A table listing many vi clones, as well as a list with contact information (name, address, URL) for the clones
Pointers to several FAQ (Frequently Asked Questions) files
Some cute quotes about vi, such as the one that opened this chapter
Other links, including a link to the vi coffee mugs
The vi Lover's Home Page refers to this web site as "the only Vi site on this planet better than the one you're looking at." This site too is well worth checking out.
One of the cuter items we found is the VI Powered logo (Figure 5.1). This is a small GIF file you can add to your personal web page to show that you used vi to create it.
The original home page for the VI Powered logo is http://www.abast.es/~avelle/vi.html. This page is written in Spanish. The English home page is at http://www.darryl.com/vi.html. Instructions for adding the logo are at http://www.darryl.com/addlogo.html. Doing so consists of several simple steps:
Download the logo. Enter http://www.darryl.com/vipower.gif into your (graphical) web browser, and then save it to a file.
Add the following code to your web page in an appropriate place:
<A HREF="http://www.darryl.com/vi.html"> <IMG SRC="vipower.gif"> </A>
This puts the logo into your page and makes it into a hypertext link, that when selected will go to the VI Powered home page. You may wish to add an ALT="This Web Page is vi Powered" attribute to the <IMG> tag, for users of non-graphical browsers.
Add the following code to the <HEAD> section of your web page:
<META name="editor" content="/usr/bin/vi">
Just as the Real Programmer will eschew a WYSIWYG word processor in favor of troff, so too, Real Webmasters eschew fancy HTML authoring tools in favor of vi. You can use the VI Powered logo to display this fact with pride.
You can find additional logos at http://www.vim.org/pics.html ("made in vi," "designed in vi," and so on). One of these may suit your fancy better than the VI Powered logo.
Despite the title, this subsection is about the java you drink, not the Java you program in.[66]
[66]Although it's fitting, somehow, that Java came from Sun Microsystems, where Bill Joy, vi's original author, is a founder and vice president.
Our hypothetical Real Programmer, while using vi to write her C++ code, her troff documentation, and her web page, undoubtedly will want a cup of coffee now and then. She can now drink her coffee from a mug with a vi command reference printed on it!
The URL is http://www.vireference.com/vimug.htm. The mugs come in sets of four, with a concise vi command summary printed on the mug. The web site has pricing and shipping information; you might want to split a set of four with one or more friends.
The two home pages have a large number of links to documentation on vi. Of special note, though, is a nine-part online tutorial from Unix World magazine, by Walter Zintz. The starting off point is http://www.wcmh.com/uworld/archives/95/tutorial/009/009.html. (You're probably better off just following the link from one of two vi home pages.) The tutorial covers the following topics:
Editor fundamentals
Line-mode addresses
The g (global) command
The substitute command
The editing environment (the set command, tags, and EXINIT and .exrc)
Addresses and columns
The replacement commands, r and R
Automatic indentation
Macros
Also available with the tutorial is an online quiz that you can use to see how well you've absorbed the material in the tutorial. Or you can just try the quiz directly, to see how well we've done with this book!
Copyright © 2003 O'Reilly & Associates. All rights reserved.