Enhanced Tags and Tag Stacks
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.
Exuberant ctags
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.
Extended ctags keywords
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
\\
, \t
, \r
,
and \n
, respectively.
Solaris vi Tag Stacking
vi provides ex and vi commands for managing the tag stack.
Tag commandsâex
Command ... |
---|
Get vi and Vim Editors Pocket Reference, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.