Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
etags(1)
Edit
PageHistory
Diff
Info
LikePages
etags !!!etags NAME SYNOPSIS DESCRIPTION OPTIONS SEE ALSO COPYING ---- !!NAME etags, ctags - generate tag file for Emacs, vi !!SYNOPSIS __etags [[-aCDRSVh] [[-i__ ''file''__] [[-l__ ''language''__] [[-i__ ''regexp''__] [[-o__ ''tagfile''__]__ [[--c++] [[--no-defines] [[--ignore-indentation] [[--language=''language''] [[--regex=''regexp''] [[--no-regexp] [[--help] [[--version] [[--include=''file''] [[--output=''tagfile''] [[--append] ''file'' ... __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'' ... !!DESCRIPTION The `__etags__' program is used to create a tag table file, in a format understood by __emacs__(__1__); the `__ctags__' program is used to create a similar table in a format understood by __vi__(__1__). Both forms of the program understand the syntax of C, C++, Fortran, Pascal, LaTeX, Scheme, Emacs Lisp/Common Lisp, Erlang, Prolog and most assembler-like syntaxes. Both forms read the files specified on the command line, and write a tag table (defaults: `TAGS' for __etags__, `tags' for __ctags__) in the current working directory. Files speci- fied with relative file names will be recorded in the tag table with file names relative to the directory where the tag table resides. Files specified with absolute file names will be recorded with absolute file names. The pro- grams recognize the language used in an input file based on its file name and contents. The --language switch can be used to force parsing of the file names following the switch according to the given language, overriding guesses based on filename extensions. !!OPTIONS Some options make sense only for the __vi__ style tag files produced by ctags; __etags__ does not recognize them. The programs accept unambiguous abbreviations for long option names. __-a, --append__ Append to existing tag file. (For vi-format tag files, see also __--update__.) __-B, --backward-search__ Tag files written in the format expected by __vi__ con- tain regular expression search instructions; the __-B__ option writes them using the delimiter `__?__', to search ''backwards'' through files. The default is to use the delimiter `__/__', to search ''forwards'' through files. Only __ctags__ accepts this option. __-C, --c++__ Treat files with `.c' and `.h' extensions as C++ code, not C code. Files with `.C', `.H', `.cxx', `.hxx', or `.cc' extensions are always assumed to be C++ code. __-d, --defines__ Create tag entries for C preprocessor definitions, too. This is the default behavior for __etags__, so this option is only accepted by __ctags__. __-D, --no-defines__ Do not create tag entries for C preprocessor defi- nitions. This may make the tags file much smaller if many header files are tagged. This is the de- fault behavior for __ctags__, so this option is only accepted by __etags__. __-l__ ''language'', __--language=__''language'' Parse the following files according to the given language. More than one such options may be inter- mixed with filenames. Use __--help__ to get a list of the available languages and their default filename extensions. The `auto' language can be used to re- store automatic detection of language based on filename extension. The `none' language may be used to disable language parsing altogether; only regexp matching is done in this case (see the __--regex__ option). __-o__ ''tagfile'', __--output=__''tagfile'' Explicit name of file for tag table; overrides de- fault `TAGS' or `tags'. (But ignored with __-v__ or __-x__.) __-r__ ''regexp'', __--regex=__''regexp'' Make tags based on regexp matching for each line of the files following this option, in addition to the tags made with the standard parsing based on lan- guage. May be freely intermixed with filenames and the __-R__ option. The regexps are cumulative, i.e. each option will add to the previous ones. The regexps are of the form: __/__''tagregexp''[[__/__''nameregexp'']__/__ where ''tagregexp'' is used to match the lines that must be tagged. It should not match useless char- acters. 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. __ctags__ ignores regexps without a ''nameregexp''. 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]* CONFIGURATION) +[[^ ]* +OF/' --regex='/[[ t]*\ 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/''' __-R, --no-regex__ Don't do any more regexp matching on the following files. May be freely intermixed with filenames and the __--regex__ option. __-S, --ignore-indentation__ Don't rely on indentation as much as we normally do. Currently, this means not to assume that a closing brace in the first column is the final brace of a function or structure definition in C and C++. __-t, --typedefs__ Record typedefs in C code as tags. Since this is the default behaviour of __etags__, only __ctags__ accepts this option. __-T, --typedefs-and-c++__ Generate tag entries for typedefs, struct, enum, and union tags, and C++ member functions. Since this is the default behaviour of __etags__, only __ctags__ accepts this option. __-u, --update__ Update tag entries for ''files'' specified on command line, leaving tag entries for other files in place. Currently, this is implemented by deleting the ex- isting entries for the given files and then rewrit- ing the new entries at the end of the tags file. It is often faster to simply rebuild the entire tag file than to use this. Only __ctags__ accepts this op- tion. __-v, --vgrind__ Instead of generating a tag file, write index (in __vgrind__ format) to standard output. Only __ctags__ ac- cepts this option. __-w, --no-warn__ Suppress warning messages about duplicate entries. The __etags__ program does not check for duplicate en- tries, so this option is not allowed with it. __-x, --cxref__ Instead of generating a tag file, write a cross reference (in __cxref__ format) to standard output. Only __ctags__ accepts this option. __-H, --help__ Print usage information. __-V, --version__ Print the current version of the program (same as the version of the emacs __etags__ is shipped with). !!SEE ALSO `__emacs__' entry in __info__; ''GNU Emacs Manual'', Richard Stallman.__ cxref__(__1__), __emacs__(__1__), __vgrind__(__1__), __vi__(__1__). !!COPYING Copyright (c) 1992 Free Software Foundation, Inc. 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 ver- sions 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 con- ditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original En- glish. ----
One page links to
etags(1)
:
Man1e
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.