⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctags.1

📁 ctags-5.5.4.tar.gz,一个很好的代码开发以及编辑源码
💻 1
📖 第 1 页 / 共 4 页
字号:
.TP 5\fB--exclude\fP=[\fIpattern\fP]Add \fIpattern\fP to a list of excluded files and directories. This optionmay be specified as many times as desired. For each file name considered by\fBctags\fP, each \fIpattern\fP specified using this option will be comparedagainst both the complete path (e.g. some/path/base.ext) and the base name(e.g. base.ext) of the file, thus allowing patterns which match a given filename irrespective of its path, or match only a specific path. If appropriatesupport is available from the runtime library of your C compiler, then\fIpattern\fP may contain the usual shell wildcards (not regular expressions)common on Unix (be sure to quote the option parameter to protect the wildcardsfrom being expanded by the shell before being passed to \fBctags\fP; also beaware that wildcards can match the slash character, '/'). You can determine ifshell wildcards are available on your platform by examining the output of the\fB--version\fP option, which will include "+wildcards" in the compiledfeature list; otherwise, \fIpattern\fP is matched against file names using asimple textual comparison.If \fIpattern\fP begins with the character '@', then the rest of the stringis interpreted as a file name from which to read exclusion patterns, one perline. If \fIpattern\fP is empty, the list of excluded patterns is cleared.Note that at program startup, the default exclude list contains "EIFGEN","SCCS", "RCS", and "CVS", which are names of directories for which it isgenerally not desirable to descend while processing the \fB--recurse\fPoption..TP 5\fB--excmd\fP=\fItype\fPDetermines the type of EX command used to locate tags in the source file.[Ignored in etags mode]The valid values for \fItype\fP (either the entire word or the first letter isaccepted) are:.RS 5.TP 9.I numberUse only line numbers in the tag file for locating tags. This has fouradvantages:.PD 0.RS 9.TP 41.Significantly reduces the size of the resulting tag file..TP 42.Eliminates failures to find tags because the line defining the tag haschanged, causing the pattern match to fail (note that some editors, such as\fBvim\fP, are able to recover in many such instances)..TP 43.Eliminates finding identical matching, but incorrect, source lines (see\fBBUGS\fP, below)..TP 44.Retains separate entries in the tag file for lines which are identical incontent. In \fIpattern\fP mode, duplicate entries are dropped because thesearch patterns they generate are identical, making the duplicate entriesuseless..RE.PD 1.IPHowever, this option has one significant drawback: changes to the source filescan cause the line numbers recorded in the tag file to no longer correspondto the lines in the source file, causing jumps to some tags to miss the targetdefinition by one or more lines. Basically, this option is best used when thesource code to which it is applied is not subject to change. Selecting thisoption type causes the following options to be ignored: \fB-BF\fP..TP 9.I patternUse only search patterns for all tags, rather than the line numbers usuallyused for macro definitions. This has the advantage of not referencing obsoleteline numbers when lines have been added or removed since the tag file wasgenerated..TP 9.I mixedIn this mode, patterns are generally used with a few exceptions. For C, linenumbers are used for macro definition tags. This was the default formatgenerated by the original \fBctags\fP and is, therefore, retained as thedefault for this option. For Fortran, line numbers are used for common blocksbecause their corresponding source lines are generally identical, makingpattern searches useless for finding all matches..RE.TP 5\fB--extra\fP=\fI[+|-]flags\fPSpecifies whether to include extra tag entries for certain kinds ofinformation. The parameter \fIflags\fP is a set of one-letter flags, eachrepresenting one kind of extra tag entry to include in the tag file. If\fIflags\fP is preceded by by either the '+' or '-' character, the effect ofeach flag is added to, or removed from, those currently enabled; otherwise theflags replace any current settings. The meaning of each flag is as follows:.PP.RS 8.TP 4.I fInclude an entry for the base file name of every source file (e.g."example.c"), which addresses the first line of the file..TP 4.I qInclude an extra class-qualified tag entry for each tag which is a memberof a class (for languages for which this information is extracted; currentlyC++, Eiffel, and Java). The actual form of the qualified tag depends upon thelanguage from which the tag was derived (using a form that is most natural forhow qualified calls are specified in the language). For C++, it is in the form"class::member"; for Eiffel and Java, it is in the form "class.member". Thismay allow easier location of a specific tags when multiple occurrences of atag name occur in the tag file. Note, however, that this could potentiallymore than double the size of the tag file..RE.TP 5\fB--fields\fP=\fI[+|-]flags\fPSpecifies the available extension fields which are to be included in theentries of the tag file (see \fBTAG FILE FORMAT\fP, below, for moreinformation). The parameter \fIflags\fP is a set of one-letter flags, eachrepresenting one type of extension field to include, with the followingmeanings (disabled by default unless indicated):.PP.PD 0.RS 8.TP 4.I aAccess (or export) of class members.TP 4.I fFile-restricted scoping [enabled].TP 4.I iInheritance information.TP 4.I kKind of tag as a single letter [enabled].TP 4.I KKind of tag as full name.TP 4.I lLanguage of source file containing tag.TP 4.I mImplementation information.TP 4.I nLine number of tag definition.TP 4.I sScope of tag definition [enabled].TP 4.I SSignature of routine (e.g. prototype or parameter list).TP 4.I zInclude the "kind:" key in kind field.PD 1.RE.RS 5Each letter or group of letters may be preceded by either '+' to add it to thedefault set, or '-' to exclude it. In the absence of any preceding '+' or '-'sign, only those kinds explicitly listed in \fIflags\fP will be included inthe output (i.e. overriding the default set). This option is ignored if theoption \fB--format\fP=\fI1\fP has been specified. The default value of this options is \fIfks\fP..RE.TP 5\fB--file-scope\fP[=\fIyes\fP|\fIno\fP]Indicates whether tags scoped only for a single file (i.e. tags which cannotbe seen outside of the file in which they are defined, such as "static" tags)should be included in the output. See, also, the \fB-h\fP option. This optionis enabled by default..TP 5\fB--filter\fP[=\fIyes\fP|\fIno\fP]Causes \fBctags\fP to behave as a filter, reading source file names fromstandard input and printing their tags to standard output on a file-by-filebasis. If \fB--sorted\fP is enabled, tags are sorted only within the sourcefile in which they are defined. File names are read from standard output inline-oriented input mode (see note for \fB-L\fP option) and only after filenames listed on the command line or from any file supplied using the \fB-L\fPoption. When this option is enabled, the options \fB-f\fP, \fB-o\fP,and \fB--totals\fP are ignored. This option is quite esoteric and is disabledby default. This option must appear before the first file name..TP 5\fB--filter-terminator\fP=\fIstring\fPSpecifies a string to print to standard output following the tags for eachfile name parsed when the \fB--filter\fP option is enabled. This may permit anapplication reading the output of ctags to determine when the output for eachfile is finished. Note that if the file name read is a directory and\fB--recurse\fP is enabled, this string will be printed only one once at theend of all tags found for by descending the directory. This string will alwaysbe separated from the last tag line for the file by its terminating newline.This option is quite esoteric and is empty by default. This option must appearbefore the first file name..TP 5\fB--format\fP=\fIlevel\fPChange the format of the output tag file. Currently the only valid values for\fIlevel\fP are \fI1\fP or \fI2\fP. Level 1 specifies the original tag fileformat and level 2 specifies a new extended format containing extension fields(but in a manner which retains backward-compatibility with original\fBvi\fP(1) implementations). The default level is 2. This option must appearbefore the first file name. [Ignored in etags mode].TP 5.B \--helpPrints to standard output a detailed usage description, and then exits..TP 5\fB--if0\fP[=\fIyes\fP|\fIno\fP]Indicates a preference as to whether code within an "#if 0" branch of apreprocessor conditional should be examined for non-macro tags (macro tags arealways included). Because the intent of this construct is to disable code, thedefault value of this options is \fIno\fP. Note that this indicates apreference only and does not guarantee skipping code within an "#if 0" branch,since the fall-back algorithm used to generate tags when preprocessorconditionals are too complex follows all branches of a conditional. Thisoption is disabled by default..TP 5\fB--<LANG>-kinds\fP=\fI[+|-]kinds\fPSpecifies a list of language-specific kinds of tags (or kinds) to include inthe output file for a particular language, where \fB<LANG>\fP iscase-insensitive and is one of the built-in language names (see the\fB--list-languages\fP option for a complete list). The parameter \fIkinds\fPis a group of one-letter flags designating kinds of tags (particular to thelanguage) to either include or exclude from the output. The specific sets offlags recognized for each language, their meanings and defaults may be listusing the \fB--list-kinds\fP option. Each letter or group of letters may bepreceded by either '+' to add it to, or '-' to remove it from, the defaultset. In the absence of any preceding '+' or '-' sign, only those kindsexplicitly listed in \fIkinds\fP will be included in the output (i.e.overriding the default for the specified language).As an example for the C language, in order to add prototypes and externalvariable declarations to the default set of tag kinds, but exclude macros,use \fB--c-kinds\fP=\fI+px-d\fP; to include only tags for functions, use\fB--c-kinds\fP=\fIf\fP..TP 5\fB--langdef\fP=\fIname\fPDefines a new user-defined language, \fIname\fP, to be parsed with regularexpressions. Once defined, \fIname\fP may be used in other options takinglanguage names. The typical use of this option is to first define thelanguage, then map file names to it using \fI--langmap\fP, then specifyregular expressions using \fI--regex-<LANG>\fP to define how its tags arefound..TP 5\fB--langmap\fP=\fImap[,map[...]]\fPControls how file names are mapped to languages (see the \fB--list-maps\fPoption). Each comma-separated \fImap\fP consists of the language name (eithera built-in or user-defined language), a colon, and a list of file extensionsand/or file name patterns. A file extension is specified by preceding theextension with a period (e.g. ".c"). A file name pattern is specified byenclosing the pattern in parentheses (e.g. "([Mm]akefile)"). If appropriatesupport is available from the runtime library of your C compiler, then thefile name pattern may contain the usual shell wildcards common on Unix (besure to quote the option parameter to protect the wildcards from beingexpanded by the shell before being passed to \fBctags\fP). You can determineif shell wildcards are available on your platform by examining the output ofthe \fB--version\fP option, which will include "+wildcards" in the compiledfeature list; otherwise, the file name patterns are matched against file namesusing a simple textual comparison.If the first character in a map is a plus sign, then the extensions and filename patterns in that map will be appended to the current map for thatlanguage; otherwise, the map will replace the current map. For example, tospecify that only files with extensions of .c and .x are to be treated as Clanguage files, use "\fB--langmap\fP=\fIc:.c.x\fP"; to also add files withextensions of .j as Java language files, specify"\fB--langmap\fP=\fIc:.c.x,java:+.j\fP". To map makefiles (.e.g filesnamed either "Makefile", "makefile", or having the extension ".mak") to alanguage called "make", specify "\fB--langmap\fP=\fImake:([Mm]akefile).mak\fP".To map files having no extension, specify a period not followed by anon-period character (e.g. ".", "..x", ".x."). To clear the mapping for aparticular language (thus inhibiting automatic generation of tags for thatlanguage), specify an empty extension list (e.g."\fB--langmap\fP=\fIfortran:\fP"). To restore the default language mappingsfor all a particular language, supply the keyword "default" for the mapping.To specify restore the default language mappings for all languages, specify"\fB--langmap\fP=\fIdefault\fP". Note that file extensions are tested beforefile name patterns when inferring the language of a file..TP 5\fB--language-force\fP=\fIlanguage\fPBy default, \fBctags\fP automatically selects the language of a source file,ignoring those files whose language cannot be determined (see\fBSOURCE FILES\fP, above). This option forces the specified \fIlanguage\fP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -