COHERENT manpages
This page displays the COHERENT manpage for ctags [Generate tags and refs files for vi editor].
List of available manpages
Index
ctags -- Command
Generate tags and refs files for vi editor
ctags [-r] files...
ctags generates the files tags and refs from a group of C-source files.
tags is used by the elvis editor's :tag command, <ctrl-]> command,
and -t option. refs is used by the command ref.
Each C-source file is scanned for #define statements and global function
definitions. The name of the macro or function becomes the name of a tag.
For each tag, a line is added to tags, which contains the following:
-> the name of the tag
-> a tab character
-> the name of the file containing the tag
-> a tab character
-> a way to find the particular line within the file
refs is used by the command ref, which can be invoked via elvis's K
command. When ctags finds a global function definition, it copies the
function header into refs. The first line is flush against the right
margin, but the argument definitions are indented. The command ref can
search refs much faster than it could search all C-source files. The file-
names list will typically include the names of all C-source files in the
current directory, in the following format:
ctags -r *.[ch]
The -r to ctags tells it to generate both tags and refs. Without -r, it
generates only tags.
See Also
commands,
elvis,
ref
Notes
This version of ctags does not parse ANSI source code very well. It has
trouble recognizing the ANSI function definitions.
ctags is copyright © 1990 by Steve Kirkendall, and was written by
Steve Kirkendall (kirkenda@cs.pdx.edu) assisted by numerous volunteers. It
is freely redistributable, subject to the restrictions noted in included
documentation. Source code for ctags is available through the Mark
Williams bulletin board, USENET, and numerous other outlets.
Please note that this program is offered as a service to COHERENT users,
but is not supported by Mark Williams Company. Caveat utilitor.