ctags [-aCdRSVh] [-BtTuvwx] [-l language]
[-i regexp] [-o tagfile]
[--c++] [--defines] [--ignore-indentation]
[--no-warn] [--cxref] [--backward-search]
[--forward-search] [--typedefs] [--typedefs-and-c++]
[--language=language] [--regex=regexp]
[--help] [--version]
[--output=tagfile] [--append] [--update] file ...
/tagregexp[/nameregexp]/
where tagregexp is used to match the lines that must be tagged.
It should not match useless characters. If the match is
such that more characters than needed are unavoidably matched by
tagregexp, it may be useful to add a nameregexp, to
narrow down the tag scope.
Here are some examples. All the regexps are quoted to protect them
from shell interpretation.
Tag the DEFVAR macros in the emacs source files:
--regex='/[ \t]*DEFVAR_[A-Z_ \t(]+"\([^"]+\)"/'
Tag VHDL files (this example is a single long line, broken here for
formatting reasons):
--language=none --regex='/[ \t]*\(ARCHITECTURE\|\
CONFIGURATION\) +[^ ]* +OF/' --regex='/[ \t]*\
\(ATTRIBUTE\|ENTITY\|FUNCTION\|PACKAGE\( BODY\)?\
\|PROCEDURE\|PROCESS\|TYPE\)[ \t]+\([^ \t(]+\)/\3/'
Tag Cobol files:
--language=none --regex='/.......[a-zA-Z0-9-]+\./'
Tag Postscript files:
--language=none --regex='#/[^ \t{]+#/'
Tag TCL files (this last example shows the usage of a tagregexp):
--lang=none --regex='/proc[ \t]+\([^ \t]+\)/\1/'
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English.