taglist.txt

来自「给vim增加函数列表。Author: Yegappan Lakshmanan (」· 文本 代码 · 共 1,420 行 · 第 1/5 页

TXT
1,420
字号
						*'Tlist_Show_Menu'*Tlist_Show_Menu~When using GUI Vim, you can display the tags defined in the current file in amenu named "Tags". By default, this feature is turned off. To turn on thisfeature, set the 'Tlist_Show_Menu' variable to 1:>	let Tlist_Show_Menu = 1<						*'Tlist_Show_One_File'*Tlist_Show_One_File~By default, the taglist plugin will display the tags defined in all the loadedbuffers in the taglist window. If you prefer to display the tags defined onlyin the current buffer, then you can set the 'Tlist_Show_One_File' to 1. Whenthis variable is set to 1, as you switch between buffers, the taglist windowwill be refreshed to display the tags for the current buffer and the tags forthe previous buffer will be removed.>	let Tlist_Show_One_File = 1<						*'Tlist_Sort_Type'*Tlist_Sort_Type~The 'Tlist_Sort_Type' variable specifies the sort order for the tags in thetaglist window. The tags can be sorted either alphabetically by their name orby the order of their appearance in the file (chronological order). Bydefault, the tag names will be listed by the order in which they are definedin the file. You can change the sort type (from name to order or from order toname) by pressing the "s" key in the taglist window. You can also change thedefault sort order by setting 'Tlist_Sort_Type' to "name" or "order":>	let Tlist_Sort_Type = "name"<						*'Tlist_Use_Horiz_Window'*Tlist_Use_Horiz_Window~Be default, the tag names are displayed in a vertically split window. If youprefer a horizontally split window, then set the 'Tlist_Use_Horiz_Window'variable to 1. If you are running MS-Windows version of Vim in a MS-DOScommand window, then you should use a horizontally split window instead of avertically split window. Also, if you are using an older version of xterm in aUnix system that doesn't support changing the xterm window width, you shoulduse a horizontally split window.>	let Tlist_Use_Horiz_Window = 1<						*'Tlist_Use_Right_Window'*Tlist_Use_Right_Window~By default, the vertically split taglist window will appear on the left handside. If you prefer to open the window on the right hand side, you can set the'Tlist_Use_Right_Window' variable to 1:>	let Tlist_Use_Right_Window = 1<						*'Tlist_Use_SingleClick'*Tlist_Use_SingleClick~By default, when you double click on the tag name using the left mouse button, the cursor will be positioned at the definition of the tag. You can set the 'Tlist_Use_SingleClick' variable to 1 to jump to a tag whenyou single click on the tag name using the mouse. By default this variableis set to zero.>	let Tlist_Use_SingleClick = 1<Due to a bug in Vim, if you set 'Tlist_Use_SingleClick' to 1 and try to resizethe taglist window using the mouse, then Vim will crash. This problem is fixedin Vim 6.3 and above. In the meantime, instead of resizing the taglist windowusing the mouse, you can use normal Vim window resizing commands to resize thetaglist window.						*'Tlist_WinHeight'*Tlist_WinHeight~The default height of the horizontally split taglist window is 10. This can bechanged by modifying the 'Tlist_WinHeight' variable:>	let Tlist_WinHeight = 20<The |'winfixheight'| option is set for the taglist window, to maintain theheight of the taglist window, when new Vim windows are opened and existingwindows are closed.						*'Tlist_WinWidth'*Tlist_WinWidth~The default width of the vertically split taglist window is 30. This can bechanged by modifying the 'Tlist_WinWidth' variable:>	let Tlist_WinWidth = 20<Note that the value of the |'winwidth'| option setting determines the minimumwidth of the current window. If you set the 'Tlist_WinWidth' variable to avalue less than that of the |'winwidth'| option setting, then Vim will use thevalue of the |'winwidth'| option.When new Vim windows are opened and existing windows are closed, the taglistplugin will try to maintain the width of the taglist window to the sizespecified by the 'Tlist_WinWidth' variable.==============================================================================						*taglist-commands*7. Commands~The taglist plugin provides the following ex-mode commands:|:TlistAddFiles|	Add multiple files to the taglist.|:TlistAddFilesRecursive|			Add files recursively to the taglist.|:TlistClose|		Close the taglist window.|:TlistDebug|		Start logging of taglist debug messages.|:TlistLock|		Stop adding new files to the taglist.|:TlistMessages|	Display the logged taglist plugin debug messages.|:TlistOpen|		Open and jump to the taglist window.|:TlistSessionSave|	Save the information about files and tags in the			taglist to a session file.|:TlistSessionLoad|	Load the information about files and tags stored			in a session file to taglist.|:TlistShowPrototype|	Display the prototype of the tag at or before the		    	specified line number.|:TlistShowTag|		Display the name of the tag defined at or before the			specified line number.|:TlistHighlightTag|	Highlight the current tag in the taglist window.|:TlistToggle|		Open or close (toggle) the taglist window.|:TlistUndebug|		Stop logging of taglist debug messages.|:TlistUnlock|		Start adding new files to the taglist.|:TlistUpdate|		Update the tags for the current buffer.						*:TlistAddFiles*:TlistAddFiles {file(s)} [file(s) ...]		Add one or more specified files to the taglist. You can		specify multiple filenames using wildcards. To specify a		file name with space character, you should escape the space		character with a backslash.		Examples:>		    :TlistAddFiles *.c *.cpp		    :TlistAddFiles file1.html file2.html<		If you specify a large number of files, then it will take some		time for the taglist plugin to process all of them. The		specified files will not be edited in a Vim window and will		not be added to the Vim buffer list.						*:TlistAddFilesRecursive*:TlistAddFilesRecursive {directory} [ {pattern} ]		Add files matching {pattern} recursively from the specified		{directory} to the taglist. If {pattern} is not specified,		then '*' is assumed. To specify the current directory, use "."		for {directory}. To specify a directory name with space		character, you should escape the space character with a		backslash.		Examples:>		    :TlistAddFilesRecursive myproject *.java		    :TlistAddFilesRecursive smallproject<		If large number of files are present in the specified		directory tree, then it will take some time for the taglist		plugin to process all of them.						*:TlistClose*:TlistClose	Close the taglist window. This command can be used from any		one of the Vim windows.						*:TlistDebug*:TlistDebug [filename]		Start logging of debug messages from the taglist plugin.		If {filename} is specified, then the debug messages are stored		in the specified file. Otherwise, the debug messages are		stored in a script local variable. If the file {filename} is		already present, then it is overwritten.						*:TlistLock*:TlistLock		Lock the taglist and don't process new files. After this		command is executed, newly edited files will not be added to		the taglist.						*:TlistMessages*:TlistMessages		Display the logged debug messages from the taglist plugin		in a window.  This command works only when logging to a		script-local variable.						*:TlistOpen*:TlistOpen	Open and jump to the taglist window. Creates the taglist		window, if the window is not opened currently. After executing		this command, the cursor is moved to the taglist window.  When		the taglist window is opened for the first time, all the files		in the buffer list are processed and the tags defined in them		are displayed in the taglist window.						*:TlistSessionSave*:TlistSessionSave {filename}		Saves the information about files and tags in the taglist to		the specified file. This command can be used to save and		restore the taglist contents across Vim sessions.						*:TlistSessionLoad*:TlistSessionLoad {filename}		Load the information about files and tags stored in the		specified session file to the taglist.						*:TlistShowPrototype*:TlistShowPrototype [filename] [linenumber]		Display the prototype of the tag at or before the specified		line number. If the file name and the line number are not		specified, then the current file name and line number are		used. A tag spans multiple lines starting from the line where		it is defined to the line before the next tag. This command		displays the prototype for the tag for any line number in this		range. 						*:TlistShowTag*:TlistShowTag [filename] [linenumber]		Display the name of the tag defined at or before the specified		line number. If the file name and the line number are not		specified, then the current file name and line number are		used. A tag spans multiple lines starting from the line where		it is defined to the line before the next tag. This command		displays the tag name for any line number in this range. 						*:TlistHighlightTag*:TlistHighlightTag		Highlight the current tag in the taglist window. By default,		the taglist plugin periodically updates the taglist window to		highlight the current tag. This command can be used to force		the taglist plugin to highlight the current tag.						*:TlistToggle*:TlistToggle	Open or close (toggle) the taglist window. Opens the taglist		window, if the window is not opened currently. Closes the		taglist window, if the taglist window is already opened. When		the taglist window is opened for the first time, all the files		in the buffer list are processed and the tags are displayed in		the taglist window. After executing this command, the cursor		is not moved from the current window to the taglist window.						*:TlistUndebug*:TlistUndebug		Stop logging of debug messages from the taglist plugin.						*:TlistUnlock*:TlistUnlock		Unlock the taglist and start processing newly edited files.						*:TlistUpdate*:TlistUpdate	Update the tags information for the current buffer. This		command can be used to re-process the current file/buffer and		get the tags information. As the taglist plugin uses the file		saved in the disk (instead of the file displayed in a Vim		buffer), you should save a modified buffer before you update		the taglist. Otherwise the listed tags will not include the		new tags created in the buffer. You can use this command even		when the taglist window is not opened.==============================================================================						*taglist-functions*8. Global functions~The taglist plugin provides several global functions that can be used fromother Vim plugins to interact with the taglist plugin. These functions aredescribed below.|Tlist_Update_File_Tags()|		Update the tags for the specified file|Tlist_Get_Tag_Prototype_By_Line()|	Return the prototype of the tag at or				    	before the specified line number in the				    	specified file.|Tlist_Get_Tagname_By_Line()|		Return the name of the tag at or					before the specified line number in					the specified file.|Tlist_Set_App()|			Set the name of the application					controlling the taglist window.					    *Tlist_Update_File_Tags()*Tlist_Update_File_Tags({filename}, {filetype})		Update the tags for the file {filename}. The second argument		specifies the Vim filetype for the file. If the taglist plugin		has not processed the file previously, then the exuberant		ctags tool is invoked to generate the tags for the file.					    *Tlist_Get_Tag_Prototype_By_Line()*Tlist_Get_Tag_Prototype_By_Line([{filename}, {linenumber}])		Return the prototype of the tag at or before the specified		line number in the specified file. If the filename and line		number are not specified, then the current buffer name and the		current line number are used.

⌨️ 快捷键说明

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