?? taglist.txt
字號:
You can remove a file from the taglist window, by pressing the 'd' key when thecursor is on one of the tags listed for the file in the taglist window. Theremoved file will no longer be displayed in the taglist window in the currentVim session. To again display the tags for the file, open the file in a Vimwindow and then use the ":TlistUpdate" command or use ":TlistAddFiles" commandto add the file to the taglist.When a buffer is removed from the Vim buffer list using the ":bdelete" orthe ":bwipe" command, the taglist is updated to remove the stored informationfor this buffer.Updating the tags displayed for a file~The taglist plugin keeps track of the modification time of a file. When themodification time changes (the file is modified), the taglist pluginautomatically updates the tags listed for that file. The modification time ofa file is checked when you enter a window containing that file or when youload that file.You can also update or refresh the tags displayed for a file by pressing the"u" key in the taglist window. If an existing file is modified, after the fileis saved, the taglist plugin automatically updates the tags displayed for thefile.You can also use the ":TlistUpdate" command to update the tags for the currentbuffer after you made some changes to it. You should save the modified bufferbefore you update the taglist window. Otherwise the listed tags will notinclude the new tags created in the buffer. If you have deleted the tags displayed for a file in the taglist window usingthe 'd' key, you can again display the tags for that file using the":TlistUpdate" command.Controlling the taglist updates~To disable the automatic processing of new files or modified files, you canset the 'Tlist_Auto_Update' variable to zero. When this variable is set tozero, the taglist is updated only when you use the ":TlistUpdate" command orthe ":TlistAddFiles" or the ":TlistAddFilesRecursive" commands. You can usethis option to control which files are added to the taglist.You can use the ":TlistLock" command to lock the taglist contents. After thiscommand is executed, new files are not automatically added to the taglist.When the taglist is locked, you can use the ":TlistUpdate" command to add thecurrent file or the ":TlistAddFiles" or ":TlistAddFilesRecursive" commands toadd new files to the taglist. To unlock the taglist, use the ":TlistUnlock"command.Displaying the tag prototype~To display the prototype of the tag under the cursor in the taglist window,press the space bar. If you place the cursor on a tag name in the taglistwindow, then the tag prototype is displayed at the Vim status line after|'updatetime'| milliseconds. The default value for the |'updatetime'| Vimoption is 4 seconds.You can get the name and prototype of a tag without opening the taglist windowand the taglist menu using the ":TlistShowTag" and the ":TlistShowPrototype"commands. To use these commands without the taglist window, set the'Tlist_Process_File_Always' variable to 1.You can use the ":TlistShowTag" command to display the name of the tag at orbefore the specified line number in the specified file. If the file name andline number are not supplied, then this command will display the name of thecurrent tag. For example,> :TlistShowTag :TlistShowTag myfile.java 100<You can use the ":TlistShowPrototype" command to display the prototype of thetag at or before the specified line number in the specified file. If the filename and the line number are not supplied, then this command will display theprototype of the current tag. For example,> :TlistShowPrototype :TlistShowPrototype myfile.c 50<In the taglist window, when the mouse is moved over a tag name, the tagprototype is displayed in a balloon. This works only in GUI versions whereballoon evaluation is supported.Taglist window contents~The tag names are grouped by their type (variable, function, class, etc.). Fortags with scope information (like class members, structures inside structures,etc.), the scope information is displayed in square brackets "[]" after the tagname.The contents of the taglist buffer/window are managed by the taglist plugin.The |'filetype'| for the taglist buffer is set to 'taglist'. The Vim|'modifiable'| option is turned off for the taglist buffer. You should notmanually edit the taglist buffer, by setting the |'modifiable'| flag. If youmanually edit the taglist buffer contents, then the taglist plugin will be outof sync with the taglist buffer contents and the plugin will no longer workcorrectly. To redisplay the taglist buffer contents again, close the taglistwindow and reopen it.Opening and closing the tag and file tree~In the taglist window, the tag names are displayed as a foldable tree usingthe Vim folding support. You can collapse the tree using the '-' key or usingthe Vim |zc| fold command. You can open the tree using the '+' key or usingthe Vim |zo| fold command. You can open all the folds using the '*' key orusing the Vim |zR| fold command. You can also use the mouse to open/close thefolds. You can close all the folds using the '=' key. You should not manuallycreate or delete the folds in the taglist window.To automatically close the fold for the inactive files/buffers and open onlythe fold for the current buffer in the taglist window, set the'Tlist_File_Fold_Auto_Close' variable to 1.Sorting the tags for a file~The tags displayed in the taglist window can be sorted either by their name orby their chronological order. The default sorting method is by the order inwhich the tags appear in a file. You can change the default sort method bysetting the 'Tlist_Sort_Type' variable to either "name" or "order". You cansort the tags by their name by pressing the "s" key in the taglist window. Youcan again sort the tags by their chronological order using the "s" key. Eachfile in the taglist window can be sorted using different order.Zooming in and out of the taglist window~You can press the 'x' key in the taglist window to maximize the taglistwindow width/height. The window will be maximized to the maximum possiblewidth/height without closing the other existing windows. You can again press'x' to restore the taglist window to the default width/height. *taglist-session*Taglist Session~A taglist session refers to the group of files and their tags stored in thetaglist in a Vim session.You can save and restore a taglist session (and all the displayed tags) usingthe ":TlistSessionSave" and ":TlistSessionLoad" commands.To save the information about the tags and files in the taglist to a file, usethe ":TlistSessionSave" command and specify the filename:> :TlistSessionSave <file name><To load a saved taglist session, use the ":TlistSessionLoad" command: > :TlistSessionLoad <file name><When you load a taglist session file, the tags stored in the file will beadded to the tags already stored in the taglist.The taglist session feature can be used to save the tags for large files or agroup of frequently used files (like a project). By using the taglist sessionfile, you can minimize the amount to time it takes to load/refresh the taglistfor multiple files.You can create more than one taglist session file for multiple groups offiles.Displaying the tag name in the Vim status line or the window title bar~You can use the Tlist_Get_Tagname_By_Line() function provided by the taglistplugin to display the current tag name in the Vim status line or the windowtitle bar. Similarly, you can use the Tlist_Get_Tag_Prototype_By_Line()function to display the current tag prototype in the Vim status line or thewindow title bar.For example, the following command can be used to display the current tag namein the status line:> :set statusline=%<%f%=%([%{Tlist_Get_Tagname_By_Line()}]%)<The following command can be used to display the current tag name in thewindow title bar:> :set title titlestring=%<%f\ %([%{Tlist_Get_Tagname_By_Line()}]%)<Note that the current tag name can be displayed only after the file isprocessed by the taglist plugin. For this, you have to either set the'Tlist_Process_File_Always' variable to 1 or open the taglist window or usethe taglist menu. For more information about configuring the Vim status line,refer to the documentation for the Vim |'statusline'| option.Changing the taglist window highlighting~The following Vim highlight groups are defined and used to highlight thevarious entities in the taglist window: TagListTagName - Used for tag names TagListTagScope - Used for tag scope TagListTitle - Used for tag titles TagListComment - Used for comments TagListFileName - Used for filenamesBy default, these highlight groups are linked to the standard Vim highlightgroups. If you want to change the colors used for these highlight groups, youcan define them in your .vimrc or .gvimrc files. For example, to change thehighlighting used for tag names, you can use:> :highlight TagListTagName guifg=DarkGreen ctermfg=DarkGreen<Controlling the taglist window~To use a horizontally split taglist window, instead of a vertically splitwindow, set the 'Tlist_Use_Horiz_Window' variable to 1.To use a vertically split taglist window on the rightmost side of the Vimwindow, set the 'Tlist_Use_Right_Window' variable to 1.You can specify the width of the vertically split taglist window, by settingthe 'Tlist_WinWidth' variable. You can specify the height of the horizontallysplit taglist window, by setting the 'Tlist_WinHeight' variable.When opening a vertically split taglist window, the Vim window width isincreased to accommodate the new taglist window. When the taglist window isclosed, the Vim window is reduced. To disable this, set the'Tlist_Inc_Winwidth' variable to zero.To reduce the number of empty lines in the taglist window, set the'Tlist_Compact_Format' variable to 1.To not display the Vim fold column in the taglist window, set the'Tlist_Enable_Fold_Column' variable to zero.To display the tag prototypes instead of the tag names in the taglist window,set the 'Tlist_Display_Prototype' variable to 1.To not display the scope of the tags next to the tag names, set the'Tlist_Display_Tag_Scope' variable to zero. *taglist-keys*Taglist window key list~The following table lists the description of the keys that can be usedin the taglist window. Key Description~ <CR> Jump to the location where the tag under cursor is defined. o Jump to the location where the tag under cursor is defined in a new window. p Display the tag definition in the file window and keep the cursor in the taglist window itself. <Space> Display the prototype of the tag under the cursor. For file names, display the full path to the file, file type and the number of tags. For tag types, display the tag type and the number of tags. u Update the tags listed in the taglist window s Change the sort order of the tags (by name or by order) d Remove the tags for the file under the cursor x Zoom-in or Zoom-out the taglist window + Open a fold - Close a fold * Open all folds = Close all folds [[ Jump to the beginning of the previous file <Backspace> Jump to the beginning of the previous file ]] Jump to the beginning of the next file <Tab> Jump to the beginning of the next file q Close the taglist window <F1> Display helpThe above keys will work in both the normal mode and the insert mode. *taglist-menu*Taglist menu~When using GUI Vim, the taglist plugin can display the tags defined in thecurrent file in the drop-down menu and the popup menu. By default, thisfeature is turned off. To turn on this feature, set the 'Tlist_Show_Menu'variable to 1.You can jump to a tag by selecting the tag name from the menu. You can use thetaglist menu independent of the taglist window i.e. you don't need to open thetaglist window to get the taglist menu.When you switch between files/buffers, the taglist menu is automaticallyupdated to display the tags defined in the current file/buffer.The tags are grouped by their type (variables, functions, classes, methods,etc.) and displayed as a separate sub-menu for each type.If the number of items in a tag type submenu exceeds the value specified bythe 'Tlist_Max_Submenu_Items' variable, then the submenu will be split intomultiple submenus. The default setting for 'Tlist_Max_Submenu_Items' is 25.The first and last tag names in the submenu are used to form the submenu name.The menu items are prefixed by alpha-numeric characters for easy selection bykeyboard.If the popup menu support is enabled (the |'mousemodel'| option contains"popup"), then the tags menu is added to the popup menu. You can accessthe popup menu by right clicking on the GUI window.You can regenerate the tags menu by selecting the 'Tags->Refresh menu' entry.You can sort the tags listed in the menu either by name or by order byselecting the 'Tags->Sort menu by->Name/Order' menu entry.You can tear-off the Tags menu and keep it on the side of the Vim window
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -