add vim conf files
[arrow.git] / conf_slk120 / vim / _vim / doc / taglist.txt
blob98195fe3693526724fd0772b1aa411586e22b900
1 *taglist.txt*   Plugin for browsing source code
3 Author: Yegappan Lakshmanan  (yegappan AT yahoo DOT com)
4 For Vim version 6.0 and above
5 Last change: 2005 December 28
7 1. Overview                                     |taglist-intro|
8 2. Taglist on the internet                      |taglist-internet|
9 3. Requirements                                 |taglist-requirements|
10 4. Installation                                 |taglist-install|
11 5. Usage                                        |taglist-using|
12 6. Configuration                                |taglist-configure|
13 7. Commands                                     |taglist-commands|
14 8. Global functions                             |taglist-functions|
15 9. Extending                                    |taglist-extend|
16 10. FAQ                                         |taglist-faq|
17 11. Todo                                        |taglist-todo|
19 ==============================================================================
20                                                 *taglist-intro*
21 1. Overview~
23 The "Tag List" plugin is a source code browser plugin for Vim. This plugin
24 allows you to efficiently browse through source code files for different
25 programming languages. The "Tag List" plugin provides the following features:
27     * Displays the tags (functions, classes, structures, variables, etc.) 
28       defined in a file in a vertically or horizontally split Vim window.
29     * In GUI Vim, optionally displays the tags in the Tags drop-down menu and
30       in the popup menu.
31     * Automatically updates the taglist window as you switch between
32       files/buffers. As you open new files, the tags defined in the new files
33       are added to the existing file list and the tags defined in all the
34       files are displayed grouped by the filename.
35     * When a tag name is selected from the taglist window, positions the
36       cursor at the definition of the tag in the source file.
37     * Automatically highlights the current tag name.
38     * Groups the tags by their type and displays them in a foldable tree.
39     * Can display the prototype and scope of a tag.
40     * Can optionally display the tag prototype instead of the tag name in the
41       taglist window.
42     * The tag list can be sorted either by name or by chronological order.
43     * Supports the following language files: Assembly, ASP, Awk, Beta, C,
44       C++, C#, Cobol, Eiffel, Erlang, Fortran, HTML, Java, Javascript, Lisp,
45       Lua, Make, Pascal, Perl, PHP, Python, Rexx, Ruby, Scheme, Shell, Slang,
46       SML, Sql, TCL, Verilog, Vim and Yacc.
47     * Can be easily extended to support new languages. Support for
48       existing languages can be modified easily.
49     * Provides functions to display the current tag name in the Vim status
50       line or the window title bar.
51     * The list of tags and files in the taglist can be saved and
52       restored across Vim sessions.
53     * Provides commands to get the name and prototype of the current tag.
54     * Runs in both console/terminal and GUI versions of Vim.
55     * Works with the winmanager plugin. Using the winmanager plugin, you
56       can use Vim plugins like the file explorer, buffer explorer and the
57       taglist plugin at the same time like an IDE.
58     * Can be used in both Unix and MS-Windows systems.
60 ==============================================================================
61                                                 *taglist-internet*
62 2. Taglist on the internet~
64 The home page of the taglist plugin is at:
66         http://www.geocities.com/yegappan/taglist
68 You can subscribe to the taglist mailing list to post your questions or
69 suggestions for improvement or to send bug reports. Visit the following page
70 for subscribing to the mailing list:
72         http://groups.yahoo.com/group/taglist
74 ==============================================================================
75                                                 *taglist-requirements*
76 3. Requirements~
78 The taglist plugin will work on all the platforms where the exuberant ctags
79 utility and Vim are supported (this includes MS-Windows and Unix based
80 systems).
82 The taglist plugin will work with Vim version 6.0 and above.
84 The taglist plugin relies on the exuberant ctags utility to dynamically
85 generate the tag listing. You can download the exuberant ctags utility from
87         http://ctags.sourceforge.net
89 The exuberant ctags utility must be installed in your system to use this
90 plugin. You should use exuberant ctags version 5.0 and above. This plugin
91 doesn't use or create a tags file and there is no need to create a tags file
92 to use this plugin. The taglist plugin will not work with the GNU ctags or the
93 Unix ctags utility. The exuberant ctags utility is shipped with most of the
94 Linux distributions.
96 This plugin relies on the Vim "filetype" detection mechanism to determine the
97 type of the current file. You have to turn on the Vim filetype detection by
98 adding the following line to your .vimrc file:
100         filetype on
102 The taglist plugin will not work if you run Vim in the restricted mode (using
103 the -Z command-line argument).
105 The taglist plugin uses the Vim system() function to invoke the exuberant
106 ctags utility. If Vim is compiled without the system() function then you
107 cannot use the taglist plugin. Some of the Linux distributions (Suse) compile
108 Vim without the system() function for security reasons.
110 ==============================================================================
111                                                 *taglist-install*
112 4. Installation~
114 1. Download the taglist.zip file and unzip the files to the $HOME/.vim or the
115    $HOME/vimfiles or the $VIM/vimfiles directory. After this step, you should
116    have the following two files (the directory structure should be preserved):
118         plugin/taglist.vim - main taglist plugin file
119         doc/taglist.txt    - documentation (help) file
121    Refer to the |add-plugin|, |add-global-plugin| and |'runtimepath'| Vim
122    help pages for more details about installing Vim plugins.
123 2. Change to the $HOME/.vim/doc or $HOME/vimfiles/doc or $VIM/vimfiles/doc
124    directory, start Vim and run the ":helptags ." command to process the
125    taglist help file. Without this step, you cannot jump to the taglist help
126    topics.
127 3. If the exuberant ctags utility is not present in your PATH, then set the
128    'Tlist_Ctags_Cmd' variable to point to the location of the exuberant ctags
129    utility (not to the directory) in the .vimrc file.
130 4. If you are running a terminal/console version of Vim and the terminal
131    doesn't support changing the window width then set the
132    'Tlist_Inc_Winwidth' variable to 0 in the .vimrc file.
133 5. Restart Vim.
134 6. You can now use the ":TlistToggle" command to open/close the taglist
135    window. You can use the ":help taglist" command to get more information
136    about using the taglist plugin.
138 ==============================================================================
139                                                 *taglist-using*
140 5. Usage~
142 Opening the taglist window~
143 You can open the taglist window using the ":TlistOpen" or the ":TlistToggle"
144 commands. The ":TlistOpen" command opens the taglist window and jumps to it.
145 The ":TlistToggle" command opens or closes (toggle) the taglist window and the
146 cursor remains in the current window.
148 You can map a key to invoke these commands. For example, the following command
149 creates a normal mode mapping for the <F8> key to toggle the taglist window.
151         nnoremap <silent> <F8> :TlistToggle<CR>
153 Add the above mapping to your ~/.vimrc file.
155 To automatically open the taglist window on Vim startup, set the
156 'Tlist_Auto_Open' variable to 1.  You can also open the taglist window on
157 startup using the following command line:
159         $ vim +TlistOpen
161 Closing the taglist window~
162 You can close the taglist window from the taglist window by pressing 'q' or
163 using the Vim ":q" command. You can also use any of the Vim window commands to
164 close the taglist window. Invoking the ":TlistToggle" command when the taglist
165 window is opened, closes the taglist window. You can also use the
166 ":TlistClose" command to close the taglist window.
168 To automatically close the taglist window when a tag or file is selected, you
169 can set the 'Tlist_Close_On_Select' variable to 1.  To exit Vim when only the
170 taglist window is present, set the 'Tlist_Exit_OnlyWindow' variable to 1.
172 Jumping to a tag or a file~
173 You can select a tag in the taglist window either by pressing the <Enter> key
174 or by double clicking the tag name using the mouse. To jump to a tag on a
175 single mouse click set the 'Tlist_Use_SingleClick' variable to 1. To jump to
176 the tag in a new window, press the 'o' key. You can press the 'p' key to jump
177 to the tag but still keep the cursor in the taglist window itself (preview).
179 You can open a file by pressing the <Enter> key or by double clicking the file
180 name using the mouse.
182 In the taglist window, you can use the [[ or <Backspace> key to jump to the
183 beginning of the previous file. You can use the ]] or <Tab> key to jump to the
184 beginning of the next file.
186 Highlighting the current tag~
187 The taglist plugin automatically highlights the name of the current tag in the
188 taglist window. The Vim |CursorHold| autocmd event is used for this. If the
189 current tag name is not visible in the taglist window, then the taglist window
190 contents are scrolled to make that tag name visible. You can also use the
191 ":TlistHighlightTag" command to force the highlighting of the current tag.
193 The tag name is highlighted if no activity is performed for |'updatetime'|
194 milliseconds. The default value for this Vim option is 4 seconds. To avoid
195 unexpected problems, you should not set the |'updatetime'| option to a very
196 low value.
198 To disable the automatic highlighting of the current tag name in the taglist
199 window, set the 'Tlist_Auto_Highlight_Tag' variable to zero.
201 When entering a Vim buffer/window, the taglist plugin automatically highlights
202 the current tag in that buffer/window.  If you like to disable the automatic
203 highlighting of the current tag when entering a buffer, set the
204 'Tlist_Highlight_Tag_On_BufEnter' variable to zero.
206 Adding files to the taglist~
207 When the taglist window is opened, all the files in the Vim buffer list are
208 processed and the supported files are added to the taglist.  When you edit a
209 file in Vim, the taglist plugin automatically processes this file and adds it
210 to the taglist. If you close the taglist window, the tag information in the
211 taglist is retained.
213 To process files even when the taglist window is not open, set the
214 'Tlist_Process_File_Always' variable to 1.
216 You can manually add multiple files to the taglist without opening them using
217 the ":TlistAddFiles" and the ":TlistAddFilesRecursive" commands.
219 For example, to add all the C files in the /my/project/dir directory to the
220 taglist, you can use the following command:
222         :TlistAddFiles /my/project/dir/*.c
224 Note that when adding several files with a large number of tags or a large
225 number of files, it will take several seconds to several minutes for the
226 taglist plugin to process all the files. You should not interrupt the taglist
227 plugin by pressing <CTRL-C>.
229 You can recursively add multiple files from a directory tree using the
230 ":TlistAddFilesRecursive" command:
232         :TlistAddFilesRecursive /my/project/dir *.c
234 This command takes two arguments. The first argument specifies the directory
235 from which to recursively add the files. The second optional argument
236 specifies the wildcard matching pattern for selecting the files to add. The
237 default pattern is * and all the files are added.
239 Removing files from the taglist~
240 You can remove a file from the taglist window, by pressing the 'd' key when the
241 cursor is on one of the tags listed for the file in the taglist window. The
242 removed file will no longer be displayed in the taglist window in the current
243 Vim session. To again display the tags for the file, open the file in a Vim
244 window and then use the ":TlistUpdate" command or use ":TlistAddFiles" command
245 to add the file to the taglist.
247 When a buffer is removed from the Vim buffer list using the ":bdelete" or
248 the ":bwipe" command, the taglist is updated to remove the stored information
249 for this buffer.
251 Updating the tags displayed for a file~
252 The taglist plugin keeps track of the modification time of a file. When the
253 modification time changes (the file is modified), the taglist plugin
254 automatically updates the tags listed for that file. The modification time of
255 a file is checked when you enter a window containing that file or when you
256 load that file.
258 You can also update or refresh the tags displayed for a file by pressing the
259 "u" key in the taglist window. If an existing file is modified, after the file
260 is saved, the taglist plugin automatically updates the tags displayed for the
261 file.
263 You can also use the ":TlistUpdate" command to update the tags for the current
264 buffer after you made some changes to it. You should save the modified buffer
265 before you update the taglist window. Otherwise the listed tags will not
266 include the new tags created in the buffer. 
268 If you have deleted the tags displayed for a file in the taglist window using
269 the 'd' key, you can again display the tags for that file using the
270 ":TlistUpdate" command.
272 Controlling the taglist updates~
273 To disable the automatic processing of new files or modified files, you can
274 set the 'Tlist_Auto_Update' variable to zero. When this variable is set to
275 zero, the taglist is updated only when you use the ":TlistUpdate" command or
276 the ":TlistAddFiles" or the ":TlistAddFilesRecursive" commands. You can use
277 this option to control which files are added to the taglist.
279 You can use the ":TlistLock" command to lock the taglist contents. After this
280 command is executed, new files are not automatically added to the taglist.
281 When the taglist is locked, you can use the ":TlistUpdate" command to add the
282 current file or the ":TlistAddFiles" or ":TlistAddFilesRecursive" commands to
283 add new files to the taglist.  To unlock the taglist, use the ":TlistUnlock"
284 command.
286 Displaying the tag prototype~
287 To display the prototype of the tag under the cursor in the taglist window,
288 press the space bar. If you place the cursor on a tag name in the taglist
289 window, then the tag prototype is displayed at the Vim status line after
290 |'updatetime'| milliseconds. The default value for the |'updatetime'| Vim
291 option is 4 seconds.
293 You can get the name and prototype of a tag without opening the taglist window
294 and the taglist menu using the ":TlistShowTag" and the ":TlistShowPrototype"
295 commands. To use these commands without the taglist window, set the
296 'Tlist_Process_File_Always' variable to 1.
298 You can use the ":TlistShowTag" command to display the name of the tag at or
299 before the specified line number in the specified file.  If the file name and
300 line number are not supplied, then this command will display the name of the
301 current tag. For example,
303         :TlistShowTag
304         :TlistShowTag myfile.java 100
306 You can use the ":TlistShowPrototype" command to display the prototype of the
307 tag at or before the specified line number in the specified file.  If the file
308 name and the line number are not supplied, then this command will display the
309 prototype of the current tag.  For example,
311         :TlistShowPrototype
312         :TlistShowPrototype myfile.c 50
314 Taglist window contents~
315 The taglist window displays the tags for all the files in the Vim buffer list
316 and all the manually added files. To display the tags for only the current
317 active buffer, set the 'Tlist_Show_One_File' variable to 1.
319 The tag names are grouped by their type (variable, function, class, etc.). For
320 tags with scope information (like class members, structures inside structures,
321 etc.), the scope information is displayed in square brackets "[]" after the tag
322 name.
324 The contents of the taglist buffer/window are managed by the taglist plugin.
325 The Vim |'modifiable'| option is turned off for the taglist buffer. You should
326 not manually edit the taglist buffer, by setting the |'modifiable'| flag. If
327 you manually edit the taglist buffer contents, then the taglist plugin will be
328 out of sync with the taglist buffer contents and the plugin will no longer
329 work correctly. To redisplay the taglist buffer contents again, close the
330 taglist window and reopen it.
332 Opening and closing the tag and file tree~
333 In the taglist window, the tag names are displayed as a foldable tree using
334 the Vim folding support. You can collapse the tree using the '-' key or using
335 the Vim |zc| fold command. You can open the tree using the '+' key or using
336 the Vim |zo| fold command. You can open all the folds using the '*' key or
337 using the Vim |zR| fold command. You can also use the mouse to open/close the
338 folds. You can close all the folds using the '=' key. You should not manually
339 create or delete the folds in the taglist window.
341 To automatically close the fold for the inactive files/buffers and open only
342 the fold for the current buffer in the taglist window, set the
343 'Tlist_File_Fold_Auto_Close' variable to 1.
345 Sorting the tags for a file~
346 The tags displayed in the taglist window can be sorted either by their name or
347 by their chronological order. The default sorting method is by the order in
348 which the tags appear in a file. You can change the default sort method by
349 setting the 'Tlist_Sort_Type' variable to either "name" or "order". You can
350 sort the tags by their name by pressing the "s" key in the taglist window. You
351 can again sort the tags by their chronological order using the "s" key. Each
352 file in the taglist window can be sorted using different order.
354 Zooming in and out of the taglist window~
355 You can press the 'x' key in the taglist window to maximize the taglist
356 window width/height. The window will be maximized to the maximum possible
357 width/height without closing the other existing windows. You can again press
358 'x' to restore the taglist window to the default width/height.
360                                                 *taglist-session*
361 Taglist Session~
362 A taglist session refers to the group of files and their tags stored in the
363 taglist in a Vim session.
365 You can save and restore a taglist session (and all the displayed tags) using
366 the ":TlistSessionSave" and ":TlistSessionLoad" commands.
368 To save the information about the tags and files in the taglist to a file, use
369 the ":TlistSessionSave" command and specify the filename:
371         :TlistSessionSave <file name>
373 To load a saved taglist session, use the ":TlistSessionLoad" command: >
375         :TlistSessionLoad <file name>
377 When you load a taglist session file, the tags stored in the file will be
378 added to the tags already stored in the taglist.
380 The taglist session feature can be used to save the tags for large files or a
381 group of frequently used files (like a project). By using the taglist session
382 file, you can minimize the amount to time it takes to load/refresh the taglist
383 for multiple files.
385 You can create more than one taglist session file for multiple groups of
386 files.
388 Displaying the tag name in the Vim status line or the window title bar~
389 You can use the Tlist_Get_Tagname_By_Line() function provided by the taglist
390 plugin to display the current tag name in the Vim status line or the window
391 title bar. Similarly, you can use the Tlist_Get_Tag_Prototype_By_Line()
392 function to display the current tag prototype in the Vim status line or the
393 window title bar.
395 For example, the following command can be used to display the current tag name
396 in the status line:
398         :set statusline=%<%f%=%([%{Tlist_Get_Tagname_By_Line()}]%)
400 The following command can be used to display the current tag name in the
401 window title bar:
403         :set title titlestring=%<%f\ %([%{Tlist_Get_Tagname_By_Line()}]%)
405 Note that the current tag name can be displayed only after the file is
406 processed by the taglist plugin. For this, you have to either set the
407 'Tlist_Process_File_Always' variable to 1 or open the taglist window or use
408 the taglist menu. For more information about configuring the Vim status line,
409 refer to the documentation for the Vim |'statusline'| option.
411 Changing the taglist window highlighting~
412 The following Vim highlight groups are defined and used to highlight the
413 various entities in the taglist window:
415     TagListTagName  - Used for tag names
416     TagListTagScope - Used for tag scope
417     TagListTitle    - Used for tag titles
418     TagListComment  - Used for comments
419     TagListFileName - Used for filenames
421 By default, these highlight groups are linked to the standard Vim highlight
422 groups. If you want to change the colors used for these highlight groups, you
423 can define them in your .vimrc or .gvimrc files.  For example, to change the
424 highlighting used for tag names, you can use:
426         :highlight TagListTagName guifg=DarkGreen ctermfg=DarkGreen
428 Controlling the taglist window~
429 To use a horizontally split taglist window, instead of a vertically split
430 window, set the 'Tlist_Use_Horiz_Window' variable to 1.
432 To use a vertically split taglist window on the rightmost side of the Vim
433 window, set the 'Tlist_Use_Right_Window' variable to 1.
435 You can specify the width of the vertically split taglist window, by setting
436 the 'Tlist_WinWidth' variable.  You can specify the height of the horizontally
437 split taglist window, by setting the 'Tlist_WinHeight' variable.
439 When opening a vertically split taglist window, the Vim window width is
440 increased to accommodate the new taglist window. When the taglist window is
441 closed, the Vim window is reduced. To disable this, set the
442 'Tlist_Inc_Winwidth' variable to zero.
444 To reduce the number of empty lines in the taglist window, set the
445 'Tlist_Compact_Format' variable to 1.
447 To not display the Vim fold column in the taglist window, set the
448 'Tlist_Enable_Fold_Column' variable to zero.
450 To display the tag prototypes instead of the tag names in the taglist window,
451 set the 'Tlist_Display_Prototype' variable to 1.
453 To not display the scope of the tags next to the tag names, set the
454 'Tlist_Display_Tag_Scope' variable to zero.
456                                                 *taglist-keys*
457 Taglist window key list~
458 The following table lists the description of the keys that can be used
459 in the taglist window.
461   Key           Description~
463   <CR>          Jump to the location where the tag under cursor is
464                 defined.
465   o             Jump to the location where the tag under cursor is
466                 defined in a new window.
467   p             Display the tag definition in the file window and
468                 keep the cursor in the taglist window itself.
469   <Space>       Display the prototype of the tag under the cursor.
470                 For file names, display the full path to the file,
471                 file type and the number of tags. For tag types, display the
472                 tag type and the number of tags.
473   u             Update the tags listed in the taglist window
474   s             Change the sort order of the tags (by name or by order)
475   d             Remove the tags for the file under the cursor
476   x             Zoom-in or Zoom-out the taglist window
477   +             Open a fold
478   -             Close a fold
479   *             Open all folds
480   =             Close all folds
481   [[            Jump to the beginning of the previous file
482   <Backspace>   Jump to the beginning of the previous file
483   ]]            Jump to the beginning of the next file
484   <Tab>         Jump to the beginning of the next file
485   q             Close the taglist window
486   ?             Display help
488 The above keys will work in both the normal mode and the insert mode.
490                                                 *taglist-menu*
491 Taglist menu~
492 When using GUI Vim, the taglist plugin can display the tags defined in the
493 current file in the drop-down menu and the popup menu. By default, this
494 feature is turned off. To turn on this feature, set the 'Tlist_Show_Menu'
495 variable to 1.
497 You can jump to a tag by selecting the tag name from the menu. You can use the
498 taglist menu independent of the taglist window i.e. you don't need to open the
499 taglist window to get the taglist menu.
501 When you switch between files/buffers, the taglist menu is automatically
502 updated to display the tags defined in the current file/buffer.
504 The tags are grouped by their type (variables, functions, classes, methods,
505 etc.) and displayed as a separate sub-menu for each type.
507 If the number of items in a tag type submenu exceeds the value specified by
508 the 'Tlist_Max_Submenu_Items' variable, then the submenu will be split into
509 multiple submenus. The default setting for 'Tlist_Max_Submenu_Items' is 25.
510 The first and last tag names in the submenu are used to form the submenu name.
511 The menu items are prefixed by alpha-numeric characters for easy selection by
512 keyboard.
514 If the popup menu support is enabled (the |'mousemodel'| option contains
515 "popup"), then the tags menu is added to the popup menu. You can access
516 the popup menu by right clicking on the GUI window.
518 You can regenerate the tags menu by selecting the 'Tags->Refresh menu' entry.
519 You can sort the tags listed in the menu either by name or by order by
520 selecting the 'Tags->Sort menu by->Name/Order' menu entry.
522 You can tear-off the Tags menu and keep it on the side of the Vim window
523 for quickly locating the tags.
525 Using the taglist plugin with the winmanager plugin~
526 You can use the taglist plugin with the winmanager plugin. This will allow you
527 to use the file explorer, buffer explorer and the taglist plugin at the same
528 time in different windows. To use the taglist plugin with the winmanager
529 plugin, set 'TagList' in the 'winManagerWindowLayout' variable. For example,
530 to use the file explorer plugin and the taglist plugin at the same time, use
531 the following setting: >
533         let winManagerWindowLayout = 'FileExplorer|TagList'
535 Getting help~
536 If you have installed the taglist help file (this file), then you can use the
537 Vim ":help taglist-<keyword>" command to get help on the various taglist
538 topics.
540 You can press the "?" key in the taglist window to display the help
541 information about using the taglist window. If you again press the '?' key,
542 the help information is removed from the taglist window.
544                                                 *taglist-debug*
545 Debugging the taglist plugin~
546 You can use the ":TlistDebug" command to enable logging of the debug messages
547 from the taglist plugin. To display the logged debug messages, you can use the
548 ":TlistMessages" command. To disable the logging of the debug messages, use
549 the ":TlistUndebug" command.
551 You can specify a file name to the ":TlistDebug" command to log the debug
552 messages to a file. Otherwise, the debug messages are stored in a script-local
553 variable. In the later case, to minimize memory usage, only the last 3000
554 characters from the debug messages are stored.
556 ==============================================================================
557                                                 *taglist-configure*
558 6. Configuration~
560 A number of Vim variables control the behavior of the taglist plugin. These
561 variables are initialized to a default value. By changing these variables you
562 can change the behavior of the taglist plugin. You need to change these
563 settings only if you want to change the behavior of the taglist plugin. You
564 should use the |:let| command in your .vimrc file to change the setting of any
565 of these variables. 
567 The configurable taglist variables are listed below. For a detailed
568 description of these variables refer to the text below this table.
570 |'Tlist_Auto_Highlight_Tag'|    Automatically highlight the current tag in the
571                                 taglist.
572 |'Tlist_Auto_Open'|             Open the taglist window when Vim starts.
573 |'Tlist_Auto_Update'|           Automatically update the taglist to include
574                                 newly edited files.
575 |'Tlist_Close_On_Select'|       Close the taglist window when a file or tag is
576                                 selected.
577 |'Tlist_Compact_Format'|        Remove extra information and blank lines from
578                                 the taglist window.
579 |'Tlist_Ctags_Cmd'|             Specifies the path to the ctags utility.
580 |'Tlist_Display_Prototype'|     Show prototypes and not tags in the taglist
581                                 window.
582 |'Tlist_Display_Tag_Scope'|     Show tag scope next to the tag name.
583 |'Tlist_Enable_Fold_Column'|    Show the fold indicator column in the taglist
584                                 window.
585 |'Tlist_Exit_OnlyWindow'|       Close Vim if the taglist is the only window.
586 |'Tlist_File_Fold_Auto_Close'|  Close tag folds for inactive buffers.
587 |'Tlist_Highlight_Tag_On_BufEnter'|
588                                 On entering a buffer, automatically highlight
589                                 the current tag.
590 |'Tlist_Inc_Winwidth'|          Increase the Vim window width to accommodate
591                                 the taglist window.
592 |'Tlist_Max_Submenu_Items'|     Maximum number of items in a tags sub-menu.
593 |'Tlist_Max_Tag_Length'|        Maximum tag length used in a tag menu entry.
594 |'Tlist_Process_File_Always'|   Process files even when the taglist window is
595                                 closed.
596 |'Tlist_Show_Menu'|             Display the tags menu.
597 |'Tlist_Show_One_File'|         Show tags for the current buffer only.
598 |'Tlist_Sort_Type'|             Sort method used for arranging the tags.
599 |'Tlist_Use_Horiz_Window'|      Use a horizontally split window for the
600                                 taglist window.
601 |'Tlist_Use_Right_Window'|      Place the taglist window on the right side.
602 |'Tlist_Use_SingleClick'|       Single click on a tag jumps to it.
603 |'Tlist_WinHeight'|             Horizontally split taglist window height.
604 |'Tlist_WinWidth'|              Vertically split taglist window width.
606                                                 *'Tlist_Auto_Highlight_Tag'*
607 Tlist_Auto_Highlight_Tag~
608 The taglist plugin will automatically highlight the current tag in the taglist
609 window. If you want to disable this, then you can set the
610 Tlist_Auto_Highlight_Tag variable to zero. Note that even though the current
611 tag highlighting is disabled, the tags for a new file will still be added to
612 the taglist window.
614         let Tlist_Auto_Highlight_Tag = 0
616 You can still use the ":TlistHighlightTag" command to highlight the current
617 tag.
619                                                 *'Tlist_Auto_Open'*
620 Tlist_Auto_Open~
621 To automatically open the taglist window, when you start Vim, you can set the
622 'Tlist_Auto_Open' variable to 1. By default, this variable is set to zero and
623 the taglist window will not be opened automatically on Vim startup.
625         let Tlist_Auto_Open = 1
627 The taglist window is opened only when a supported type of file is opened on
628 Vim startup. For example, if you open text files, then the taglist window will
629 not be opened.
631                                                 *'Tlist_Auto_Update'*
632 Tlist_Auto_Update~
633 When a new file is edited, the tags defined in the file are automatically
634 processed and added to the taglist. To stop adding new files to the taglist,
635 set the 'Tlist_Auto_Update' variable to zero. By default, this variable is set
636 to 1.
638         let Tlist_Auto_Update = 0
640                                                 *'Tlist_Close_On_Select'*
641 Tlist_Close_On_Select~
642 If you want to close the taglist window when a file or tag is selected, then
643 set the 'Tlist_Close_On_Select' variable to 1. By default, this variable is
644 set zero and when you select a tag or file from the taglist window, the window
645 will not be closed.
647         let Tlist_Close_On_Select = 1
649                                                 *'Tlist_Compact_Format'*
650 Tlist_Compact_Format~
651 By default, empty lines are used to separate different tag types displayed for
652 a file and the tags displayed for different files in the taglist window. If
653 you want to display as many tags as possible in the taglist window, you can
654 set the 'Tlist_Compact_Format' variable to 1 to get a compact display.
656         let Tlist_Compact_Format = 1
658                                                 *'Tlist_Ctags_Cmd'*
659 Tlist_Ctags_Cmd~
660 The 'Tlist_Ctags_Cmd' variable specifies the location (path) of the exuberant
661 ctags utility. If exuberant ctags is present in any one of the directories in
662 the PATH environment variable, then there is no need to set this variable.
664 The exuberant ctags tool can be installed under different names.  When the
665 taglist plugin starts up, if the 'Tlist_Ctags_Cmd' variable is not set, it
666 checks for the names exuberant-ctags, ctags, ctags.exe and tags in the PATH
667 environment variable.  If any one of the named executable is found, then the
668 Tlist_Ctags_Cmd variable is set to that name.
670 If exuberant ctags is not present in one of the directories specified in the
671 PATH environment variable, then set this variable to point to the location of
672 the ctags utility in your system. Note that this variable should point to the
673 fully qualified exuberant ctags location and NOT to the directory in which
674 exuberant ctags is installed. If the exuberant ctags tool is not found in
675 either PATH or in the specified location, then the taglist plugin will not be
676 loaded.
678         let Tlist_Ctags_Cmd = 'd:\tools\ctags.exe'
679         let Tlist_Ctags_Cmd = '/usr/local/bin/ctags'
681                                                 *'Tlist_Display_Prototype'*
682 Tlist_Display_Prototype~
683 By default, only the tag name will be displayed in the taglist window. If you
684 like to see tag prototypes instead of names, set the 'Tlist_Display_Prototype'
685 variable to 1. By default, this variable is set to zero and only tag names
686 will be displayed.
688         let Tlist_Display_Prototype = 1
690                                                 *'Tlist_Display_Tag_Scope'*
691 Tlist_Display_Tag_Scope~
692 By default, the scope of a tag (like a C++ class) will be displayed in
693 square brackets next to the tag name. If you don't want the tag scopes
694 to be displayed, then set the 'Tlist_Display_Tag_Scope' to zero. By default,
695 this variable is set to 1 and the tag scopes will be displayed.
697         let Tlist_Display_Tag_Scope = 0
699                                                 *'Tlist_Enable_Fold_Column'*
700 Tlist_Enable_Fold_Column~
701 By default, the Vim fold column is enabled and displayed in the taglist
702 window. If you wish to disable this (for example, when you are working with a
703 narrow Vim window or terminal), you can set the 'Tlist_Enable_Fold_Column'
704 variable to zero.
706         let Tlist_Enable_Fold_Column = 1
708                                                 *'Tlist_Exit_OnlyWindow'*
709 Tlist_Exit_OnlyWindow~
710 If you want to exit Vim if only the taglist window is currently opened, then
711 set the 'Tlist_Exit_OnlyWindow' variable to 1. By default, this variable is
712 set to zero and the Vim instance will not be closed if only the taglist window
713 is present.
715         let Tlist_Exit_OnlyWindow = 1
717                                                 *'Tlist_File_Fold_Auto_Close'*
718 Tlist_File_Fold_Auto_Close~
719 By default, the tags tree displayed in the taglist window for all the files is
720 opened. You can close/fold the tags tree for the files manually. To
721 automatically close the tags tree for inactive files, you can set the
722 Tlist_File_Fold_Auto_Close variable to 1. When this variable is set to 1, if a
723 Vim buffer is no longer displayed in a Vim window, the corresponding tags tree
724 in the taglist window will be collapsed/folded. When a buffer is loaded in a
725 Vim window, the corresponding tags tree will be opened.
727         let Tlist_File_Fold_Auto_Close = 1
729                                             *'Tlist_Highlight_Tag_On_BufEnter'*
730 Tlist_Highlight_Tag_On_BufEnter~
731 When you enter a Vim buffer/window, the current tag in that buffer/window is
732 automatically highlighted in the taglist window. If the current tag name is
733 not visible in the taglist window, then the taglist window contents are
734 scrolled to make that tag name visible. If you like to disable the automatic
735 highlighting of the current tag when entering a buffer, you can set the
736 'Tlist_Highlight_Tag_On_BufEnter' variable to zero. The default setting for
737 this variable is 1.
739         let Tlist_Highlight_Tag_On_BufEnter = 0
741                                                 *'Tlist_Inc_Winwidth'*
742 Tlist_Inc_Winwidth~
743 By default, when the width of the window is less than 100 and a new taglist
744 window is opened vertically, then the window width will be increased by the
745 value set in the 'Tlist_WinWidth' variable to accommodate the new window. The
746 value of this variable is used only if you are using a vertically split
747 taglist window.
749 If your terminal doesn't support changing the window width from Vim (older
750 version of xterm running in a Unix system) or if you see any weird problems in
751 the screen due to the change in the window width or if you prefer not to
752 adjust the window width then set the 'Tlist_Inc_Winwidth' variable to zero.
753 CAUTION: If you are using the MS-Windows version of Vim in a MS-DOS command
754 window then you must set this variable to zero, otherwise the system may hang
755 due to a Vim limitation (explained in :help win32-problems)
757         let Tlist_Inc_Winwidth = 0
759                                                 *'Tlist_Max_Submenu_Items'*
760 Tlist_Max_Submenu_Items~
761 If a file contains too many tags of a particular type (function, variable,
762 class, etc.), greater than that specified by the 'Tlist_Max_Submenu_Items'
763 variable, then the menu for that tag type will be split into multiple
764 sub-menus. The default setting for the 'Tlist_Max_Submenu_Items' variable is
765 25.  This can be changed by setting the 'Tlist_Max_Submenu_Items' variable:
767         let Tlist_Max_Submenu_Items = 20
769 The name of the submenu is formed using the names of the first and the last
770 tag entries in that submenu.
772                                                 *'Tlist_Max_Tag_Length'*
773 Tlist_Max_Tag_Length~
774 Only the first 'Tlist_Max_Tag_Length' characters from the tag names will be
775 used to form the tag type submenu name. The default value for this variable is
776 10.  Change the 'Tlist_Max_Tag_Length' setting if you want to include more or
777 less characters:
779         let Tlist_Max_Tag_Length = 10
781                                                 *'Tlist_Process_File_Always'*
782 Tlist_Process_File_Always~
783 By default, the taglist plugin will generate and process the tags defined in
784 the newly opened files only when the taglist window is opened or when the
785 taglist menu is enabled. When the taglist window is closed, the taglist plugin
786 will stop processing the tags for newly opened files.
788 You can set the 'Tlist_Process_File_Always' variable to 1 to generate the list
789 of tags for new files even when the taglist window is closed and the taglist
790 menu is disabled.
792         let Tlist_Process_File_Always = 1
794 To use the ":TlistShowTag" and the ":TlistShowPrototype" commands without the
795 taglist window and the taglist menu, you should set this variable to 1.
797                                                 *'Tlist_Show_Menu'*
798 Tlist_Show_Menu~
799 When using GUI Vim, you can display the tags defined in the current file in a
800 menu named "Tags". By default, this feature is turned off. To turn on this
801 feature, set the 'Tlist_Show_Menu' variable to 1:
803         let Tlist_Show_Menu = 1
805                                                 *'Tlist_Show_One_File'*
806 Tlist_Show_One_File~
807 By default, the taglist plugin will display the tags defined in all the loaded
808 buffers in the taglist window. If you prefer to display the tags defined only
809 in the current buffer, then you can set the 'Tlist_Show_One_File' to 1. When
810 this variable is set to 1, as you switch between buffers, the taglist window
811 will be refreshed to display the tags for the current buffer and the tags for
812 the previous buffer will be removed.
814         let Tlist_Show_One_File = 1
816                                                 *'Tlist_Sort_Type'*
817 Tlist_Sort_Type~
818 The 'Tlist_Sort_Type' variable specifies the sort order for the tags in the
819 taglist window. The tags can be sorted either alphabetically by their name or
820 by the order of their appearance in the file (chronological order). By
821 default, the tag names will be listed by the order in which they are defined
822 in the file. You can change the sort type (from name to order or from order to
823 name) by pressing the "s" key in the taglist window. You can also change the
824 default sort order by setting 'Tlist_Sort_Type' to "name" or "order":
826         let Tlist_Sort_Type = "name"
828                                                 *'Tlist_Use_Horiz_Window'*
829 Tlist_Use_Horiz_Window~
830 Be default, the tag names are displayed in a vertically split window. If you
831 prefer a horizontally split window, then set the 'Tlist_Use_Horiz_Window'
832 variable to 1. If you are running MS-Windows version of Vim in a MS-DOS
833 command window, then you should use a horizontally split window instead of a
834 vertically split window. Also, if you are using an older version of xterm in a
835 Unix system that doesn't support changing the xterm window width, you should
836 use a horizontally split window.
838         let Tlist_Use_Horiz_Window = 1
840                                                 *'Tlist_Use_Right_Window'*
841 Tlist_Use_Right_Window~
842 By default, the vertically split taglist window will appear on the left hand
843 side. If you prefer to open the window on the right hand side, you can set the
844 'Tlist_Use_Right_Window' variable to 1:
846         let Tlist_Use_Right_Window = 1
848                                                 *'Tlist_Use_SingleClick'*
849 Tlist_Use_SingleClick~
850 By default, when you double click on the tag name using the left mouse 
851 button, the cursor will be positioned at the definition of the tag. You 
852 can set the 'Tlist_Use_SingleClick' variable to 1 to jump to a tag when
853 you single click on the tag name using the mouse. By default this variable
854 is set to zero.
856         let Tlist_Use_SingleClick = 1
858 Due to a bug in Vim, if you set 'Tlist_Use_SingleClick' to 1 and try to resize
859 the taglist window using the mouse, then Vim will crash. This problem is fixed
860 in Vim 6.3 and above. In the meantime, instead of resizing the taglist window
861 using the mouse, you can use normal Vim window resizing commands to resize the
862 taglist window.
864                                                 *'Tlist_WinHeight'*
865 Tlist_WinHeight~
866 The default height of the horizontally split taglist window is 10. This can be
867 changed by modifying the 'Tlist_WinHeight' variable:
869         let Tlist_WinHeight = 20
871 The |'winfixheight'| option is set for the taglist window, to maintain the
872 height of the taglist window, when new Vim windows are opened and existing
873 windows are closed.
875                                                 *'Tlist_WinWidth'*
876 Tlist_WinWidth~
877 The default width of the vertically split taglist window is 30. This can be
878 changed by modifying the 'Tlist_WinWidth' variable:
880         let Tlist_WinWidth = 20
882 Note that the value of the |'winwidth'| option setting determines the minimum
883 width of the current window. If you set the 'Tlist_WinWidth' variable to a
884 value less than that of the |'winwidth'| option setting, then Vim will use the
885 value of the |'winwidth'| option.
887 When new Vim windows are opened and existing windows are closed, the taglist
888 plugin will try to maintain the width of the taglist window to the size
889 specified by the 'Tlist_WinWidth' variable.
891 ==============================================================================
892                                                 *taglist-commands*
893 7. Commands~
895 The taglist plugin provides the following ex-mode commands:
897 |:TlistAddFiles|        Add multiple files to the taglist.
898 |:TlistAddFilesRecursive|
899                         Add files recursively to the taglist.
900 |:TlistClose|           Close the taglist window.
901 |:TlistDebug|           Start logging of taglist debug messages.
902 |:TlistLock|            Stop adding new files to the taglist.
903 |:TlistMessages|        Display the logged taglist plugin debug messages.
904 |:TlistOpen|            Open and jump to the taglist window.
905 |:TlistSessionSave|     Save the information about files and tags in the
906                         taglist to a session file.
907 |:TlistSessionLoad|     Load the information about files and tags stored
908                         in a session file to taglist.
909 |:TlistShowPrototype|   Display the prototype of the tag at or before the
910                         specified line number.
911 |:TlistShowTag|         Display the name of the tag defined at or before the
912                         specified line number.
913 |:TlistHighlightTag|    Highlight the current tag in the taglist window.
914 |:TlistToggle|          Open or close (toggle) the taglist window.
915 |:TlistUndebug|         Stop logging of taglist debug messages.
916 |:TlistUnlock|          Start adding new files to the taglist.
917 |:TlistUpdate|          Update the tags for the current buffer.
919                                                 *:TlistAddFiles*
920 :TlistAddFiles {file(s)} [file(s) ...]
921                 Add one or more specified files to the taglist. You can
922                 specify multiple filenames using wildcards. To specify a
923                 file name with space character, you should escape the space
924                 character with a backslash.
925                 Examples:
927                     :TlistAddFiles *.c *.cpp
928                     :TlistAddFiles file1.html file2.html
930                 If you specify a large number of files, then it will take some
931                 time for the taglist plugin to process all of them. The
932                 specified files will not be edited in a Vim window and will
933                 not be added to the Vim buffer list.
935                                                 *:TlistAddFilesRecursive*
936 :TlistAddFilesRecursive {directory} [ {pattern} ]
937                 Add files matching {pattern} recursively from the specified
938                 {directory} to the taglist. If {pattern} is not specified,
939                 then '*' is assumed. To specify the current directory, use "."
940                 for {directory}. To specify a directory name with space
941                 character, you should escape the space character with a
942                 backslash.
943                 Examples:
945                     :TlistAddFilesRecursive myproject *.java
946                     :TlistAddFilesRecursive smallproject
948                 If large number of files are present in the specified
949                 directory tree, then it will take some time for the taglist
950                 plugin to process all of them.
952                                                 *:TlistClose*
953 :TlistClose     Close the taglist window. This command can be used from any
954                 one of the Vim windows.
956                                                 *:TlistDebug*
957 :TlistDebug [filename]
958                 Start logging of debug messages from the taglist plugin.
959                 If {filename} is specified, then the debug messages are stored
960                 in the specified file. Otherwise, the debug messages are
961                 stored in a script local variable. If the file {filename} is
962                 already present, then it is overwritten.
964                                                 *:TlistLock*
965 :TlistLock
966                 Lock the taglist and don't process new files. After this
967                 command is executed, newly edited files will not be added to
968                 the taglist.
970                                                 *:TlistMessages*
971 :TlistMessages
972                 Display the logged debug messages from the taglist plugin.
973                 This command works only when logging to a script-local
974                 variable.
976                                                 *:TlistOpen*
977 :TlistOpen      Open and jump to the taglist window. Creates the taglist
978                 window, if the window is not opened currently. After executing
979                 this command, the cursor is moved to the taglist window.  When
980                 the taglist window is opened for the first time, all the files
981                 in the buffer list are processed and the tags defined in them
982                 are displayed in the taglist window.
984                                                 *:TlistSessionSave*
985 :TlistSessionSave {filename}
986                 Saves the information about files and tags in the taglist to
987                 the specified file. This command can be used to save and
988                 restore the taglist contents across Vim sessions.
990                                                 *:TlistSessionLoad*
991 :TlistSessionLoad {filename}
992                 Load the information about files and tags stored in the
993                 specified session file to the taglist.
995                                                 *:TlistShowPrototype*
996 :TlistShowPrototype [filename] [linenumber]
997                 Display the prototype of the tag at or before the specified
998                 line number. If the file name and the line number are not
999                 specified, then the current file name and line number are
1000                 used. A tag spans multiple lines starting from the line where
1001                 it is defined to the line before the next tag. This command
1002                 displays the prototype for the tag for any line number in this
1003                 range. 
1005                                                 *:TlistShowTag*
1006 :TlistShowTag [filename] [linenumber]
1007                 Display the name of the tag defined at or before the specified
1008                 line number. If the file name and the line number are not
1009                 specified, then the current file name and line number are
1010                 used. A tag spans multiple lines starting from the line where
1011                 it is defined to the line before the next tag. This command
1012                 displays the tag name for any line number in this range. 
1014                                                 *:TlistHighlightTag*
1015 :TlistHighlightTag
1016                 Highlight the current tag in the taglist window. By default,
1017                 the taglist plugin periodically updates the taglist window to
1018                 highlight the current tag. This command can be used to force
1019                 the taglist plugin to highlight the current tag.
1021                                                 *:TlistToggle*
1022 :TlistToggle    Open or close (toggle) the taglist window. Opens the taglist
1023                 window, if the window is not opened currently. Closes the
1024                 taglist window, if the taglist window is already opened. When
1025                 the taglist window is opened for the first time, all the files
1026                 in the buffer list are processed and the tags are displayed in
1027                 the taglist window. After executing this command, the cursor
1028                 is not moved from the current window to the taglist window.
1030                                                 *:TlistUndebug*
1031 :TlistUndebug
1032                 Stop logging of debug messages from the taglist plugin.
1034                                                 *:TlistUnlock*
1035 :TlistUnlock
1036                 Unlock the taglist and start processing newly edited files.
1038                                                 *:TlistUpdate*
1039 :TlistUpdate    Update the tags information for the current buffer. This
1040                 command can be used to re-process the current file/buffer and
1041                 get the tags information. As the taglist plugin uses the file
1042                 saved in the disk (instead of the file displayed in a Vim
1043                 buffer), you should save a modified buffer before you update
1044                 the taglist. Otherwise the listed tags will not include the
1045                 new tags created in the buffer. You can use this command even
1046                 when the taglist window is not opened.
1048 ==============================================================================
1049                                                 *taglist-functions*
1050 8. Global functions~
1052 The taglist plugin provides several global functions that can be used from
1053 other Vim plugins to interact with the taglist plugin. These functions are
1054 described below.
1056 |Tlist_Update_File_Tags()|              Update the tags for the specified file
1057 |Tlist_Get_Tag_Prototype_By_Line()|     Return the prototype of the tag at or
1058                                         before the specified line number in the
1059                                         specified file.
1060 |Tlist_Get_Tagname_By_Line()|           Return the name of the tag at or
1061                                         before the specified line number in
1062                                         the specified file.
1063 |Tlist_Set_App()|                       Set the name of the application
1064                                         controlling the taglist window.
1066                                             *Tlist_Update_File_Tags()*
1067 Tlist_Update_File_Tags({filename}, {filetype})
1068                 Update the tags for the file {filename}. The second argument
1069                 specifies the Vim filetype for the file. If the taglist plugin
1070                 has not processed the file previously, then the exuberant
1071                 ctags tool is invoked to generate the tags for the file.
1073                                             *Tlist_Get_Tag_Prototype_By_Line()*
1074 Tlist_Get_Tag_Prototype_By_Line([{filename}, {linenumber}])
1075                 Return the prototype of the tag at or before the specified
1076                 line number in the specified file. If the filename and line
1077                 number are not specified, then the current buffer name and the
1078                 current line number are used.
1080                                             *Tlist_Get_Tagname_By_Line()*
1081 Tlist_Get_Tagname_By_Line([{filename}, {linenumber}])
1082                 Return the name of the tag at or before the specified line
1083                 number in the specified file. If the filename and line number
1084                 are not specified, then the current buffer name and the
1085                 current line number are used.
1087                                             *Tlist_Set_App()*
1088 Tlist_Set_App({appname})
1089                 Set the name of the plugin that controls the taglist plugin
1090                 window and buffer. This can be used to integrate the taglist
1091                 plugin with other Vim plugins.
1092                 
1093                 For example, the winmanager plugin and the Cream package use
1094                 this function and specify the appname as "winmanager" and
1095                 "cream" respectively.
1096                 
1097                 By default, the taglist plugin is a stand-alone plugin and
1098                 controls the taglist window and buffer. If the taglist window
1099                 is controlled by an external plugin, then the appname should
1100                 be set appropriately.
1102 ==============================================================================
1103                                                 *taglist-extend*
1104 9. Extending~
1106 The taglist plugin supports all the languages supported by the exuberant ctags
1107 tool, which includes the following languages: Assembly, ASP, Awk, Beta, C,
1108 C++, C#, Cobol, Eiffel, Erlang, Fortran, HTML, Java, Javascript, Lisp, Lua,
1109 Make, Pascal, Perl, PHP, Python, Rexx, Ruby, Scheme, Shell, Slang, SML, Sql,
1110 TCL, Verilog, Vim and Yacc.
1112 You can modify the taglist plugin support for the above listed languages. You
1113 can also extend the taglist plugin to add support for new languages.
1115 If you want to add support for a new language to the taglist plugin, you need
1116 to first extend the exuberant ctags tool. For more information about extending
1117 exuberant ctags, visit http://ctags.sourceforge.net/EXTENDING.html 
1119 You can extend the taglist plugin to add support for new languages or modify
1120 the support for an already supported language by setting the following
1121 variables in the .vimrc file.
1123 To modify the support for an already supported language, you have to set the
1124 tlist_xxx_settings variable. Replace xxx with the Vim filetype name. To
1125 determine the filetype name used by Vim for a file, use the following command
1126 in the buffer containing the file: >
1128         :set filetype
1130 For example, to modify the support for the perl language files, you have to
1131 set the tlist_perl_settings variable.
1133 The format of the value set in the tlist_xxx_settings variable is
1135         <language_name>;flag1:name1;flag2:name2;flag3:name3
1137 The different fields in the value are separated by the ';' character.
1139 The first field 'language_name' is the name used by exuberant ctags to refer
1140 to this language files. This name can be different from the file type name
1141 used by Vim. For example, for C++, the language name used by ctags is 'c++'
1142 but the filetype name used by Vim is 'cpp'.
1144 The remaining fields follow the format "flag:name". The sub-field 'flag' is
1145 the language specific flag used by exuberant ctags to generate the
1146 corresponding tags. For example, for the C language, to list only the
1147 functions, the 'f' flag is used. For more information about the flags
1148 supported by exuberant ctags for a particular language, read the help text
1149 from the 'ctags --help' command. The sub-field 'name' specifies the title text
1150 to use for displaying the tags of a particular type. For example, 'name' can
1151 be set to 'functions'. This field can be set to any text string name.
1153 For example, to list only the classes and functions defined in a C++
1154 language file, add the following lines to your .vimrc file
1156         let tlist_cpp_settings = 'c++;c:class;f:function'
1158 In the above setting, 'cpp' is the Vim filetype name and 'c++' is the name
1159 used by the exuberant ctags tool. 'c' and 'f' are the flags passed to
1160 exuberant ctags to list C++ classes and functions and 'class' is the title
1161 used for the class tags and 'function' is the title used for the function tags
1162 in the taglist window.
1164 For example, to display only functions defined in a C file and to use "My
1165 Functions" as the title for the function tags, use
1167         let tlist_c_settings = 'c;f:My Functions'
1169 When you set the tlist_xxx_settings variable, you will override the default
1170 setting used by the taglist plugin for the 'xxx' language. You cannot add to
1171 the default options used by the taglist plugin for a particular file type.
1173 To add support for a new language, set the tlist_xxx_settings variable
1174 appropriately as described above. Replace 'xxx' in the variable name with the
1175 Vim filetype name for the new language.
1177 For example, to extend the taglist plugin to support the latex language, you
1178 can use the following line (assuming, you have already extended exuberant
1179 ctags to support the latex language): >
1181         let tlist_tex_settings='latex;b:bibitem;c:command;l:label'
1183 With the above line, when you edit files of filetype "tex" in Vim, the taglist
1184 plugin will invoke the exuberant ctags tool passing the "latex" filetype and
1185 the flags b, c and l to generate the tags. The text heading 'bibitem',
1186 'command' and 'label' will be used in the taglist window for the tags which
1187 are generated for the flags b, c and l respectively.
1189 ==============================================================================
1190                                                 *taglist-faq*
1191 10. Frequently Asked Questions~
1193 Q. The taglist plugin doesn't work. The taglist window is empty and the tags
1194    defined in a file are not displayed. 
1195 A. Are you using Vim version 6.0 and above? The taglist plugin relies on the
1196    features supported by Vim version 6.0 and above. You can use the following
1197    command to get the Vim version:
1199         $ vim --version
1201    Are you using exuberant ctags version 5.0 and above? The taglist plugin
1202    relies on the features supported by exuberant ctags and will not work with
1203    GNU ctags or the Unix ctags utility. You can use the following command to
1204    determine whether the ctags installed in your system is exuberant ctags:
1206         $ ctags --version
1208    Did you turn on the Vim filetype detection? The taglist plugin relies on
1209    the filetype detected by Vim and passes the filetype to the exuberant ctags
1210    utility to parse the tags. Check the output of the following Vim command:
1212         :filetype
1214    To turn on the filetype detection, add the following line to the .vimrc or
1215    _vimrc file:
1217         filetype on
1219    Is your version of Vim compiled with the support for the system() function?
1220    The following Vim command should display 1:
1222         :echo exists('*system')
1224    In some Linux distributions (particularly Suse Linux), the default Vim
1225    installation is built without the support for the system() function. The
1226    taglist plugin uses the system() function to invoke the exuberant ctags
1227    utility. You need to rebuild Vim after enabling the support for the
1228    system() function. If you use the default build options, the system()
1229    function will be supported. 
1231    Do you have the |'shellslash'| option set? You can try disabling the
1232    |'shellslash'| option. When the taglist plugin invokes the exuberant ctags
1233    utility with the path to the file, if the incorrect slashes are used, then
1234    you will see errors. 
1236    Are you using a Unix shell in a MS-Windows environment? For example,
1237    the Unix shell from the MKS-toolkit. Do you have the SHELL environment
1238    set to point to this shell? You can try resetting the SHELL environment
1239    variable.
1241    Is your filetype supported by the exuberant ctags utility? The file types
1242    supported by the exuberant ctags utility are listed in the ctags help. If a
1243    file type is not supported, you have to extend exuberant ctags.
1245    Run the following command from the shell and see whether you see
1246    your tags in the output from exuberant ctags:
1248         ctags -f - --format=2 --excmd=pattern --fields=nks <filename>
1250    If you see your tags in the output from the above command, then the
1251    exuberant ctags utility is properly parsing your file.
1253    Do you have the .ctags or _ctags or the ctags.cnf file in your home
1254    directory for specifying default options or for extending exuberant ctags?
1255    If you do have this file, check the options in this file and make sure
1256    these options are not interfering with the operation of the taglist plugin.
1258    If you are using MS-Windows, check the value of the TEMP and TMP
1259    environment variables. If these environment variables are set to a path
1260    with space characters in the name, then try using the DOS 8.3 short name
1261    for the path or set them to a path without the space characters in the
1262    name. For example, if the temporary directory name is "C:\Documents and
1263    Settings\xyz\Local Settings\Temp", then try setting the TEMP variable to
1264    the following:
1266         set TEMP=C:\DOCUMEN~1\xyz\LOCALS~1\Temp
1268    If exuberant ctags is installed in a directory with space characters in the
1269    name, then try adding the directory to the PATH environment variable or try
1270    setting the 'Tlist_Ctags_Cmd' variable to the shortest path name to ctags
1271    or try copying the exuberant ctags to a path without space characters in
1272    the name. For example, if exuberant ctags is installed in the directory
1273    "C:\Program Files\Ctags", then try setting the 'Tlist_Ctags_Cmd' variable
1274    as below:
1276         let Tlist_Ctags_Cmd='C:\Progra~1\Ctags\ctags.exe'
1278 Q. When I try to open the taglist window, I am seeing the following error
1279    message. How do I fix this problem?
1281    Taglist: Failed to generate tags for /my/path/to/file
1282    ctags: illegal option -- -^@usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
1284 A. The taglist plugin will work only with the exuberant ctags tool. You
1285    cannot use the GNU ctags or the Unix ctags program with the taglist plugin.
1286    You will see an error message similar to the one shown above, if you try
1287    use a non-exuberant ctags program with Vim. To fix this problem, either add
1288    the exuberant ctags tool location to the PATH environment variable or set
1289    the 'Tlist_Ctags_Cmd' variable.
1291 Q. A file has more than one tag with the same name. When I select a tag name
1292    from the taglist window, the cursor is positioned at the incorrect tag
1293    location. 
1294 A. The taglist plugin uses the search pattern generated by the exuberant ctags
1295    utility to position the cursor at the location of a tag definition. If a
1296    file has more than one tag with the same name and same prototype, then the
1297    search pattern will be the same. In this case, when searching for the tag
1298    pattern, the cursor may be positioned at the incorrect location. 
1300 Q. I have made some modifications to my file and introduced new
1301    functions/classes/variables. I have not yet saved my file. The taglist
1302    plugin is not displaying the new tags when I update the taglist window.
1303 A. The exuberant ctags utility will process only files that are present in the
1304    disk. To list the tags defined in a file, you have to save the file and
1305    then update the taglist window. 
1307 Q. I have created a ctags file using the exuberant ctags utility for my source
1308    tree. How do I configure the taglist plugin to use this tags file? 
1309 A. The taglist plugin doesn't use a tags file stored in disk. For every opened
1310    file, the taglist plugin invokes the exuberant ctags utility to get the
1311    list of tags dynamically. The Vim system() function is used to invoke
1312    exuberant ctags and get the ctags output. This function internally uses a
1313    temporary file to store the output. This file is deleted after the output
1314    from the command is read. So you will never see the file that contains the
1315    output of exuberant ctags.
1317 Q. When I set the |'updatetime'| option to a low value (less than 1000) and if
1318    I keep pressing a key with the taglist window open, the current buffer
1319    contents are changed. Why is this?
1320 A. The taglist plugin uses the |CursorHold| autocmd to highlight the current
1321    tag. The CursorHold autocmd triggers for every |'updatetime'| milliseconds.
1322    If the |'updatetime'| option is set to a low value, then the CursorHold
1323    autocmd will be triggered frequently. As the taglist plugin changes
1324    the focus to the taglist window to highlight the current tag, this could
1325    interfere with the key movement resulting in changing the contents of
1326    the current buffer. The workaround for this problem is to not set the
1327    |'updatetime'| option to a low value.
1329 ==============================================================================
1330                                                 *taglist-todo*
1331 11. Todo~
1333 1. Group tags according to the scope and display them. For example,
1334    group all the tags belonging to a C++/Java class 
1335 2. Support for displaying tags in a modified (not-yet-saved) file. 
1336 3. Automatically open the taglist window only for selected filetypes.
1337    For other filetypes, close the taglist window. 
1338 4. When using the shell from the MKS toolkit, the taglist plugin 
1339    doesn't work.
1340 5. The taglist plugin doesn't work with files edited remotely using the
1341    netrw plugin. The exuberant ctags utility cannot process files over
1342    scp/rcp/ftp, etc.
1344 ==============================================================================
1346 vim:tw=78:ts=8:noet:ft=help: