📄 ctags.1
字号:
.\" SCCSID: @(#)ctags.1 8.3 3/28/91.TH ctags 1.SH Namectags \- create a tags file.SH Syntax.B ctags[\|\fIoptions\fR\|] \fIname...\fR.SH Description.NXR "ctags command".NXS "tags file" "ctags command".NXA "f77 compiler" "ctags command"The.PN ctagscommandmakes a tags file for.MS ex 1from the specified C, Pascal and Fortran sources..PPA tags file gives the locations of specified objects (in this casefunctions and typedefs) in a group of files. Each line of the tagsfile contains the object name, the file in which it is defined, andan address specification for the object definition. Functions aresearched with a pattern, typedefs with a line number. Specifiers aregiven in separate fields on the line, separated by blanks or tabs..PPUsing the.I tagsfile,.PN excan quickly find these objects definitions..PPIf the.B \-xflag is given, .PN ctagswrites to standard output a list containing each object name, its linenumber, the file name in which it is defined, and the text of the line.This list is a simple index which can be printed out as an off-linereadable function index..SH Options.NXR "ctags command" "options".TP 20.B \-aAppends information to an existing tags file..TP.B \-BUses backward search patterns (?...?)..TP.B \-FUses forward search patterns (/.../) (default)..TP.B \-tCreates typedef tags..TP.B \-uUpdates the specified tags file. All references to tags are deleted,and the new values are appended to the file.Note that this option is implemented in a way which is rather slow.It is usually faster to simply rebuild the.I tagsfile.).spThe tag.I mainis treated specially in C programs.The tag formed is created by prepending.I Mto the name of the file, with a trailing .c removed, ifany, and leading pathname components also removed.This makes use of.PN ctagspractical in directories with more than one program..TP.B \-vGenerates an index listing function name, file name, and pages number.Since the output will be sorted into lexicographic order,it may be desired to run the output through.BR "sort \-f" .For example,.EXctags \-v files | sort \-f > index.EEFiles whose name ends in .B \.cor.B \.hare assumed to be C source files and are searched for C routine andmacro definitions.Others are first examined to see if they contain any Pascal orFortran routine definitions; if not, they are processed againlooking for C definitions..TP.B \-wSuppresses warning diagnostics and generates a listing file. This listcontains each object name, its line number, the file name in which itis defined, and the text of the line, and is identical to the listproduced when no options are given..TP.B \-xWrites to standard output a list containing each object name, its linenumber, the file name in whcih it is defined, and the text of the line..SH Restrictions.NXR "ctags command" "restricted"Recognition of \fBfunctions\fR, \fBsubroutines\fR and \fBprocedures\fRfor FORTRAN and Pascal do not dealwith block structure. Therefore you cannot have twoPascal procedures in different blocks with the same name..PPDoes not know about #ifdefs..PPDoes not know about Pascal types.Relies on the input being well formed to detect typedefs.Use of .B \-txshows only the last line of typedefs..SH Files.DTtags output tags file.SH See Alsoex(1), vi(1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -