And These Are My Brothers,
Darrell, Darrell, and Darrell
Extended Regular Expressions
Editor Comparison Summary
A Look Ahead
There are a number of freely available "clones" of the vi editor. Appendix E, provides a pointer to a web site that lists all known vi clones. We have chosen to cover four of the most popular ones. They are:
Version 1.79 of Keith Bostic's nvi
Version 2.0 of Steve Kirkendall's elvis
Version 5.0 of Bram Moolenaar's vim
Version 7.4 of vile, by Kevin Buettner, Tom Dickey, and Paul Fox
The clones were written because the source code for vi is not freely available, making it impossible to either port vi to a non-UNIX environment or to study the code, and/or because UNIX vi (or another clone!) did not provide desired functionality. For example, UNIX vi often has limits on the maximum length of a line, and it cannot edit binary files. (The chapters on the various programs present more information about each one's history.)
Each program provides a large number of extensions to UNIX vi; often, several of the clones provide the same extensions, although usually not in an identical way. Instead of repeating the treatment of each common feature in each program's chapter, we have centralized the discussion here. You can think of this chapter as presenting "what the clones do," with each clone's chapter presenting "how the clone does it."
This chapter covers the following topics:
Several of the vi clone authors and the author of at least one ctags clone have gotten together to define a standard form for an enhanced version of the ctags format. In particular, it is now easier to use the tags functionality with programs written in C++, which allows overloaded function names.
There is one additional feature in the clones that we have chosen not to cover: extension languages. As of May 1998, nvi has preliminary support for Perl and Tcl integration, elvis has its own C-like expression evaluator, vim has a C-like expression evaluator, plus support for Perl, Python, and Tcl integration, and vile, which has always had its own built-in extension language, has preliminary support for Perl integration. The extension language integration and support are very recent for all of the programs and will undoubtedly change significantly. For this reason, any discussion of the extension language facilities would be obsolete almost as soon as this book goes to press.
The elvis 2.0 documentation mentions that "someday" elvis will have a true extension language, most likely Perl, but probably not for version 2.1. Steve Kirkendall doesn't really consider the expression evaluator to be an extension language.
We recommend that you check the online documentation for your clone if you're interested in programming your editor with an extension language. Extension languages are a feature worth watching; they promise to bring a new dimension of power to vi users. The use of well-known programming languages, such as Perl, Python, and Tcl, is an additional advantage, since it is likely that users will already know one or more of them.
Copyright © 2003 O'Reilly & Associates. All rights reserved.