Vim and most of the other vi clones provide enhanced tagging facilities. You can stack locations on a tag stack, and with Exuberant ctags, tag more items than just functions.
The “Exuberant ctags” program was written by Darren Hiebert (home page: http://ctags.sourceforge.net/). As of this writing, the current version is 5.8.
This enhanced tags file format has three tab-separated
fields: the tag name (typically an identifier), the source file
containing the tag, and the location of the identifier. Extended
attributes are placed after a separating ;"
. Each
attribute is separated from the next by a tab character and consists of
two colon-separated subfields. The first subfield is a keyword
describing the attribute; the second is the actual value.
Keyword | Meaning |
---|---|
| For functions |
| For C++ member functions and variables |
| For values in an |
| For static tags, i.e., local to the file |
| For local tags |
| The value is a single letter that indicates the lexical type of the tag |
| Intended mostly for C++ class member functions |
| For fields in a
|
If the field doesn’t contain a colon, it’s assumed to be of type
kind
.
Within the value part of each attribute, the backslash, tab,
carriage return, and newline characters should be encoded as
\
,
,
,
and
, respectively.
vi provides ex and vi commands for managing the tag stack.
Option | Function |
---|---|
| Controls the number of significant characters in a tag to be looked up; the default value of zero indicates that all characters are significant |
| The value is a list of filenames in which to look
for tags; the default value is |
| When set to |
3.145.45.5