- 论坛徽章:
- 0
|
Enhanced tags
As described in Section 7.5.3 in Chapter 7, you can use the ctags program
to build up a searchable database of your files. The clones make it possible
to "stack" tags, by saving your current location when you do a tag search.
You can then return to that location. Multiple locations can be saved in a
Last In First Out (LIFO) order, producing a stack of locations.
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.
Improved editing facilities
All of the clones provide the ability to edit the ex command line, "infinite
undo" capability, arbitrary length lines and eight-bit data, incremental
searching, (at least an option) to scroll the screen left to right for long
lines instead of wrapping long lines, and mode indicators, as well as other
features.
Programming assistance
Several of the editors provide features that allow you to stay within the
editor during the typical "edit-compile-debug" cycle of software
development.
Syntax highlighting
In elvis, vim, and vile, you can arrange to display different parts of a file in
different colors and/or fonts. This is particularly useful for editing program
source code.
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,[2] 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.
[2] 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.[3] 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. |
|