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

📄 tagsearch.txt

📁 MSYS在windows下模拟了一个类unix的终端
💻 TXT
📖 第 1 页 / 共 3 页
字号:
*tagsearch.txt* For Vim version 5.8.  Last change: 2001 May 10		  VIM REFERENCE MANUAL    by Bram MoolenaarTags and special searches				*tags-and-searches*1. Jump to a tag		|tag-commands|2. Tag stack			|tag-stack|3. Tag match list		|tag-matchlist|4. Tags details			|tag-details|5. Tags file format		|tags-file-format|6. Include file searches	|include-search|7. 'Grep' and 'Lid'		|grep|==============================================================================1. Jump to a tag					*tag-commands* *tag*							*tags*A tag is an identifier that appears in a "tags" file.  It is a sort of labelthat can be jumped to.  For example: In C programs each function name can beused as a tag.  The "tags" file has to be generated by a program like ctags,before the tag commands can be used.With the ":tag" command the cursor will be positioned on the tag.  With theCTRL-] command, the keyword on which the cursor is standing is used as thetag.  If the cursor is not on a keyword, the first keyword to the right of thecursor is used.The ":tag" command works very well for C programs.  If you see a call to afunction and wonder what that function does, position the cursor inside of thefunction name and hit CTRL-].  This will bring you to the function definition.An easy way back is with the CTRL-T command.  Also read about the tag stackbelow.							*:ta* *:tag*:ta[g][!] {ident}	Jump to the definition of {ident}, using the			information in the tags file(s).  Put {ident} in the			tag stack.  See |tag-!| for [!].			{ident} can be a regexp pattern, see |tag-regexp|.			When there are several matching tags for {ident}, the			first one is jumped to. |:tnext|.g<LeftMouse>						*g<LeftMouse>*<C-LeftMouse>					*<C-LeftMouse>* *CTRL-]*CTRL-]			Same as ":tag {ident}", where {ident} is the keyword			under or after cursor.  {Vi: identifier after the			cursor}							*v_CTRL-]*{Visual}CTRL-]		Same as ":tag {ident}", where {ident} is the text that			is highlighted.  {not in Vi}							*telnet-CTRL-]*CTRL-] is the default telnet escape key.  When you type CTRL-] to jump to atag, you will get the telnet prompt instead.  Most versions of telnet allowchanging or disabling the default escape key.  See the telnet man page.  Youcan 'telnet -E {Hostname}' to disable the escape character, or 'telnet -e{EscapeCharacter} {Hostname}' to specify another escape character.  Ifpossible, try to use "rsh" instead of "telnet" to avoid this problem.							*tag-priority*When there are multiple matches for a tag, this priority is used:1. "FSC"  A full matching static tag for the current file.2. "F C"  A full matching global tag for the current file.3. "F  "  A full matching global tag for another file.4. "FS "  A full matching static tag for another file.5. " SC"  An ignore-case matching static tag for the current file.6. "  C"  An ignore-case matching global tag for the current file.7. "   "  An ignore-case matching global tag for another file.8. " S "  An ignore-case matching static tag for another file.Note that when the current file changes, the priority list is mostly notchanged, to avoid confusion when using ":tnext".  It is changed when using":tag {ident}".The ignore-case matches are not found for a ":tag" command when the'ignorecase' option is off.  They are found when a pattern is used (startingwith a "/") and for ":tselect", also when 'ignorecase' is off.  Note thatusing ignore-case tag searching disables binary searching in the tags file,which causes a slowdown.==============================================================================2. Tag stack						*tag-stack* *tagstack*On the tag stack is remembered which tags you jumped to, and from where.Tags are only pushed onto the stack when the 'tagstack' option is set.g<RightMouse>						*g<RightMouse>*<C-RightMouse>					*<C-RightMouse>* *CTRL-T*CTRL-T			Jump to [count] older entry in the tag stack			(default 1).  {not in Vi}							*:po* *:pop*:[count]po[p][!]	Jump to [count] older entry in tag stack (default 1).			See |tag-!| for [!].  {not in Vi}:[count]ta[g][!]	Jump to [count] newer entry in tag stack (default 1).			See |tag-!| for [!].  {not in Vi}							*:tags*:tags			Show the contents of the tag stack.  The active			entry is marked with a '>'.  {not in Vi}The output of ":tags" looks like this:   # TO tag      FROM line in file/line   1  1 main		 1  harddisk2:text/vim/test > 2  2 FuncA		58  i = FuncA(10);   3  1 FuncC	       357  harddisk2:text/vim/src/amiga.cThis list shows the tags that you jumped to and the cursor position beforethat jump.  The older tags are at the top, the newer at the bottom.The '>' points to the active entry.  This is the tag that will be used by thenext ":tag" command.  The CTRL-T and ":pop" command will use the positionabove the active entry.Below the "TO" is the number of the current match in the match list.  Notethat this doesn't change when using ":pop" or ":tag".The line number and file name are remembered to be able to get back to whereyou were before the tag command.  The line number will be correct, also whendeleting/inserting lines, unless this was done by another program (e.g.another instance of Vim).For the current file, the "file/line" column shows the text at the position.An indent is removed and a long line is truncated to fit in the window.You can jump to previously used tags with several commands.  Some examples:	":pop" or CTRL-T	to position before previous tag	{count}CTRL-T		to position before {count} older tag	":tag"			to newer tag	":0tag"			to last used tagThe most obvious way to use this is while browsing through the call graph ofa program.  Consider the following call graph:	main  --->  FuncA  --->  FuncC	      --->  FuncB(Explanation: main calls FuncA and FuncB; FuncA calls FuncC).You can get from main to FuncA by using CTRL-] on the call to FuncA.  Thenyou can CTRL-] to get to FuncC.  If you now want to go back to main you canuse CTRL-T twice.  Then you can CTRL-] to FuncB.If you issue a ":ta {ident}" or CTRL-] command, this tag is inserted at thecurrent position in the stack.  If the stack was full (it can hold up to 20entries), the oldest entry is deleted and the older entries shift oneposition up (their index number is decremented by one).  If the last usedentry was not at the bottom, the entries below the last used one aredeleted.  This means that an old branch in the call graph is lost.  After thecommands explained above the tag stack will look like this:   # TO tag	FROM line in file   1 main	       1  harddisk2:text/vim/test   2 FuncB	      59  harddisk2:text/vim/src/main.c >==============================================================================3. Tag match list					*tag-matchlist*When there are several matching tags, these commands can be used to jumpbetween them.  Note that these command don't change the tag stack, they keepthe same entry.							*:ts* *:tselect*:ts[elect][!] [ident]	List the tags that match [ident], using the			information in the tags file(s).			When [ident] is not given, the last tag name from the			tag stack is used.			With a '>' in the first column is indicated which is			the current position in the list (if there is one).			[ident] can be a regexp pattern, see |tag-regexp|.			See |tag-priority| for the priorities used in the			listing.  {not in Vi}			Example output:	 nr pri kind tag		file ~>	  1 F	f    mch_delay		os_amiga.c>			mch_delay(msec, ignoreinput)>	> 2 F	f    mch_delay		os_msdos.c>			mch_delay(msec, ignoreinput)>	  3 F	f    mch_delay		os_unix.c>			mch_delay(msec, ignoreinput)>	Enter nr of choice (<CR> to abort):			See |tag-priority| for the "pri" column.  Note that			this depends on the current file, thus using			":tselect xxx" can produce different results.			The "kind" column gives the kind of tag, if this was			included in the tags file.			The "info" column shows information that could be			found in the tags file.  It depends on the program			that produced the tags file.			When the list is long, you may get the |more-prompt|.			If you already see the tag you want to use, you can			type 'q' and enter the number.							*:sts* *:stselect*:sts[elect][!] [ident]	Does ":tselect[!] [ident]" and splits the window for			the selected tag.  {not in Vi}							*g]*g]			Like CTRL-], but use ":tselect" instead of ":tag".			{not in Vi}							*:tj* *:tjump*:tj[ump][!] [ident]	Like ":tselect", but jump to the tag directly when			there is only one match.  {not in Vi}							*:stj* *:stjump*:stj[ump][!] [ident]	Does ":tjump[!] [ident]" and splits the window for the			selected tag.  {not in Vi}							*g_CTRL-]*g CTRL-]		Like CTRL-], but use ":tjump" instead of ":tag".			{not in Vi}							*:tn* *:tnext*:[count]tn[ext][!]	Jump to [count] next matching tag (default 1).  See			|tag-!| for [!].  {not in Vi}							*:tp* *:tprevious*:[count]tp[revious][!]	Jump to [count] previous matching tag (default 1).			See |tag-!| for [!].  {not in Vi}							*:tN* *:tNext*:[count]tN[ext][!]	Same as ":tprevious".  {not in Vi}							*:tr* *:trewind*:[count]tr[ewind][!]	Jump to first matching tag.  If [count] is given, jump			to [count]th matching tag.  See |tag-!| for [!].  {not			in Vi}							*:tl* *:tlast*:tl[ast][!]		Jump to last matching tag.  See |tag-!| for [!].  {not			in Vi}When there is no other message, Vim shows which matching tag has been jumpedto, and the number of matching tags:>	tag 1 of 3 or moreThe " or more" is used to indicate that Vim didn't try all the tags files yet.When using ":tnext" a few times, or with ":tlast", more matches may be found.When you didn't see this message because of some other message, or you justwant to know where you are, this command will show it again (and jump to thesame tag as last time):>	:0tn							*tag-skip-file*When a matching tag is found for which the file doesn't exist, this match isskipped and the next matching tag is used.  Vim reports this, to notify you ofmissing files.  When the end of the list of matches has been reached, an errormessage is given.The tag match list can also be used in the preview window.  The commands arethe same as above, with a "p" prepended.							*:pts* *:ptselect*:pts[elect][!] [ident]	Does ":tselect[!] [ident]" and shows the new tag in a			"Preview" window. See |:ptag| for more info.			{not in Vi}							*:ptj* *:ptjump*:ptj[ump][!] [ident]	Does ":tjump[!] [ident]" and shows the new tag in a			"Preview" window. See |:ptag| for more info.			{not in Vi}

⌨️ 快捷键说明

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