📄 ctags.html
字号:
this class is derived (i.e. inherits from).<P><DT><I>signature</I><DD>When present, <I>value</I>. is a language-dependent representation of thesignature of a routine. A routine signature in its complete form specifies thereturn type of a routine and its formal argument list. This extension field ispresently supported only for C-based languages and does not include the returntype.<P></DL><P>In addition, information on the scope of the tag definition may be available,with the key portion equal to some language-dependent construct name and itsvalue the name declared for that construct in the program. This scope entryindicates the scope in which the tag was found. For example, a tag generatedfor a C structure member would have a scope looking like "struct:myStruct".<P><P><A NAME="lbAI"> </A><H2>HOW TO USE WITH VI</H2>Vi will, by default, expect a tag file by the name "tags" in the currentdirectory. Once the tag file is built, the following commands exercise the tagindexing feature:<DL COMPACT><DT><B>vi -t tag</B><DD>Start vi and position the cursor at the file and line where "tag" is defined.<DT><B>:ta tag</B><DD>Find a tag.<DT><B>Ctrl-]</B><DD>Find the tag under the cursor.<DT><B>Ctrl-T</B><DD>Return to previous location before jump to tag (not widely implemented).<P><P></DL><A NAME="lbAJ"> </A><H2>HOW TO USE WITH GNU EMACS</H2>Emacs will, by default, expect a tag file by the name "TAGS" in the currentdirectory. Once the tag file is built, the following commands exercise thetag indexing feature:<DL COMPACT><DT><B>M-x visit-tags-table <RET> FILE <RET></B><DD>Select the tag file, "FILE", to use.<DT><B>M-. [TAG] <RET></B><DD>Find the first definition of TAG. The default tag is the identifier under thecursor.<DT><B>M-*</B><DD>Pop back to where you previously invoked "M-.".<DT><B>C-u M-.</B><DD>Find the next definition for the last tag.<P></DL><P>For more commands, see the <I>Tags</I> topic in the Emacs info document.<P><P><A NAME="lbAK"> </A><H2>HOW TO USE WITH NEDIT</H2>NEdit version 5.1 and later can handle the new extended tag file format (see<B>--format</B>). To make NEdit use the tag file, select "File->Load TagsFile". To jump to the definition for a tag, highlight the word, the pressCtrl-D. NEdit 5.1 can can read multiple tag files from different directories.Setting the X resource nedit.tagFile to the name of a tag file instructs NEditto automatically load that tag file at startup time.<P><P><A NAME="lbAL"> </A><H2>CAVEATS</H2>Because <B>ctags</B> is neither a preprocessor nor a compiler, use ofpreprocessor macros can fool <B>ctags</B> into either missing tags orimproperly generating inappropriate tags. Although <B>ctags</B> has beendesigned to handle certain common cases, this is the single biggest cause ofreported problems. In particular, the use of preprocessor constructs whichalter the textual syntax of C can fool <B>ctags</B>. You can work around manysuch problems by using the <B>-I</B> option.<P>White space is treated as a separator for file names and options read fromlist files, specified using the <B>-L</B> option, and in filter mode (specifiedusing the <B>--filter</B> option). Therefore, it is not currently possible tosupply file names or other options containing embedded white space (spaces,etc.) through these options.<P>Note that when <B>ctags</B> generates uses patterns for locating tags (seethe <B>--excmd</B> option), it is entirely possible that the wrong line may befound by your editor if there exists another source line which is identical tothe line containing the tag. The following example demonstrates this condition:<P><DL COMPACT><DT><DD>int variable;<P>/* ... */<BR>void foo(variable)<BR>int variable;<BR>{<DL COMPACT><DT><DD>/* ... */</DL>}</DL><P>Depending upon which editor you use and where in the code you happen to be, itis possible that the search pattern may locate the local parameter declarationin foo() before it finds the actual global variable definition, since thelines (and therefore their search patterns are identical). This can be avoidedby use of the <B>--excmd</B>=<I>n</I> option.<P><P><A NAME="lbAM"> </A><H2>BUGS</H2><B>Ctags</B> has more options than <B><A HREF="http://localhost/cgi-bin/man/man2html?1+ls">ls</A></B>(1).<P>When parsing a C++ member function definition (e.g. "className::function"),<B>ctags</B> cannot determine whether the scope specifier is a class name or anamespace specifier and always lists it as a class name in the scope portionof the extension fields. Also, if a C++ function is defined outside of theclass declaration (the usual case), the access specification (i.e. public,protected, or private) and implementation information (e.g. virtual, purevirtual) contained in the function declaration are not known when the tag isgenerated for the function definition. It will, however be available forprototypes (e.g <B>--c++-kinds</B>=<I>+p</I>).<P>No qualified tags are generated for language objects inherited into a class.<P><P><A NAME="lbAN"> </A><H2>ENVIRONMENT VARIABLES</H2><P><DL COMPACT><DT><B>CTAGS</B><DD>If this environment variable exists, it will be expected to contain a set ofdefault options which are read when <B>ctags</B> starts, after theconfiguration files listed in <B>FILES</B>, below, are read, but before anycommand line options are read. Options appearing on the command line willoverride options specified in this variable. Only options will be read fromthis variable. Note that all white space in this variable in considered aseparator, making it impossible to pass an option parameter containing anembedded space. If this is a problem, use a configuration file instead.<P><DT><B>ETAGS</B><DD>Similar to the <B>CTAGS</B> variable above, this variable, if found, will beread when <B>etags</B> starts. If this variable is not found, <B>etags</B> willtry to use <B>CTAGS</B> instead.<P><DT><B>TMPDIR</B><DD>On Unix-like hosts where mkstemp() is available, the value of this variablespecifies the directory in which to place temporary files. This can be usefulif the size of a temporary file becomes too large to fit on the partitionholding the default temporary directory defined at compilation time.<B>ctags</B> creates temporary files only if either (1) an emacs-style tag fileis being generated, (2) the tag file is being sent to standard output, or (3)the program was compiled to use an internal sort algorithm to sort the tagfiles instead of the the sort utility of the operating system. If the sortutility of the operating system is being used, it will generally observe thisvariable also. Note that if <B>ctags</B> is setuid, the value of TMPDIR will beignored.<P><P></DL><A NAME="lbAO"> </A><H2>FILES</H2><I>/ctags.cnf (on MSDOS, MSWindows only)</I><BR><I>/etc/ctags.conf</I><BR><I>/usr/local/etc/ctags.conf</I><BR><I>$HOME/.ctags ($HOME/ctags.cnf on MSDOS, MSWindows)</I><BR><I>.ctags (ctags.cnf on MSDOS, MSWindows)</I><DL COMPACT><DT><DD>If any of these configuration files exist, each will be expected to contain aset of default options which are read in the order listed when <B>ctags</B>starts, but before the <B>CTAGS</B> environment variable is read or any commandline options are read. This makes it possible to set up site-wide, personalor project-level defaults. It is possible to compile <B>ctags</B> to read anadditional configuration file before any of those shown above, which will beindicated if the output produced by the <B>--version</B> option lists the"custom-conf" feature. Options appearing in the <B>CTAGS</B> environmentvariable or on the command line will override options specified in thesefiles. Only options will be read from these files. Note that the option filesare read in line-oriented mode in which spaces are significant (sinceshell quoting is not possible). Each line of the file is read as one commandline parameter (as if it were quoted with single quotes). Therefore, use newlines to indicate separate command-line arguments.<P><DT><I>tags</I><DD>The default tag file created by <B>ctags</B>.<DT><I>TAGS</I><DD>The default tag file created by <B>etags</B>.<P></DL><A NAME="lbAP"> </A><H2>SEE ALSO</H2>The official Exuberant Ctags web site at:<P><DL COMPACT><DT><DD><A HREF="http://ctags.sourceforge.net">http://ctags.sourceforge.net</A></DL><P>Also <B><A HREF="http://localhost/cgi-bin/man/man2html?1+ex">ex</A></B>(1), <B><A HREF="http://localhost/cgi-bin/man/man2html?1+vi">vi</A></B>(1), <B>elvis</B>, or, better yet, <B>vim</B>, theofficial editor of <B>ctags</B>. For more information on <B>vim</B>, see the VIMPages web site at:<P><DL COMPACT><DT><DD><A HREF="http://www.vim.org/">http://www.vim.org/</A></DL><P><P><A NAME="lbAQ"> </A><H2>AUTHOR</H2>Darren Hiebert <dhiebert at users.sourceforge.net><BR><A HREF="http://DarrenHiebert.com/">http://DarrenHiebert.com/</A><P><P><A NAME="lbAR"> </A><H2>MOTIVATION</H2>"Think ye at all times of rendering some service to every member of the humanrace."<P>"All effort and exertion put forth by man from the fullness of his heart isworship, if it is prompted by the highest motives and the will to do serviceto humanity."<P><DL COMPACT><DT><DD>-- From the Baha'i Writings</DL><P><P><A NAME="lbAS"> </A><H2>CREDITS</H2>This version of <B>ctags</B> was originally derived from and inspired by thectags program by Steve Kirkendall <<A HREF="mailto:kirkenda@cs.pdx.edu">kirkenda@cs.pdx.edu</A>> that comes with theElvis vi clone (though virtually none of the original code remains).<P>Credit is also due Bram Moolenaar <<A HREF="mailto:Bram@vim.org">Bram@vim.org</A>>, the author of <B>vim</B>, whohas devoted so much of his time and energy both to developing the editor as aservice to others, and to helping the orphans of Uganda.<P>The section entitled "HOW TO USE WITH GNU EMACS" was shamelessly stolen fromthe info page for GNU <B>etags</B>.<P><HR><A NAME="index"> </A><H2>Index</H2><DL><DT><A HREF="#lbAB">NAME</A><DD><DT><A HREF="#lbAC">SYNOPSIS</A><DD><DT><A HREF="#lbAD">DESCRIPTION</A><DD><DT><A HREF="#lbAE">SOURCE FILES</A><DD><DT><A HREF="#lbAF">OPTIONS</A><DD><DT><A HREF="#lbAG">OPERATIONAL DETAILS</A><DD><DT><A HREF="#lbAH">TAG FILE FORMAT</A><DD><DT><A HREF="#lbAI">HOW TO USE WITH VI</A><DD><DT><A HREF="#lbAJ">HOW TO USE WITH GNU EMACS</A><DD><DT><A HREF="#lbAK">HOW TO USE WITH NEDIT</A><DD><DT><A HREF="#lbAL">CAVEATS</A><DD><DT><A HREF="#lbAM">BUGS</A><DD><DT><A HREF="#lbAN">ENVIRONMENT VARIABLES</A><DD><DT><A HREF="#lbAO">FILES</A><DD><DT><A HREF="#lbAP">SEE ALSO</A><DD><DT><A HREF="#lbAQ">AUTHOR</A><DD><DT><A HREF="#lbAR">MOTIVATION</A><DD><DT><A HREF="#lbAS">CREDITS</A><DD></DL><HR>This document was created by<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,using the manual pages.<BR>Time: 04:52:46 GMT, May 30, 2006</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -