[ANN] TagManager: New plugin for integrated tag management; beta-testing help requested!
- [This was posted on vim_use]
This new plugin (TagManager) attempts to fill in the need for simple integrated tags database management from within Vim -- if you get annoyed having to refresh the tags databases manually, then this plugin should be of interest to you. I'm hoping that I can catch any platform-specific bugs in this attempt and also iron-out the interface to suit different user needs. I did notice that the database updates took longer at times -- there are some optimizations that can be done to improve speeds later. I would appreciate your feedback, comments, and bug reports. Thanks a bunch!
Plugin provides an integrated environment within Vim for building, maintaining,
and using tag databases.
* Specify a list of files or regex file search patterns for inclusion
in tags database
* Support for multiple databases
* Build and track tag databases for freshness
+ Tracks new file creations when using regex file patterns
+ Update tag databases on every file save with
efficient incremental updates
+ Tracks file changes outside of Vim
* Might slow-up with huge databases because of Vim specific limitations
- Recommended method is to split multiple tag databases for
1) Exuberant Ctags or other equivalent tag generation app
2) Vim 7 and above
Copy this file to ~/.vim/plugins/
or to /vimfiles/plugins/ (on Win32 platforms)
Add the following to your ~/.vimrc, and launch vim from the project
TagManagerAddDb tags *.[ch] <change as per source language )
TagMangerAddDb tags **/*.[ch] <Recursive; use only if there are
:TagManagerAddDb <tagDB name> <filelist/pattern> [directory]
:TagManagerAddDb tags *.[ch]
:TagManagerAddDb tags *.[ch] .
[Note that both commands do the same, the directory is optional;
if omitted, the current directory is used]
:TagManagerAddDb tags **/*.[ch]
Recursively add all .c and .h files in the current directory and
directories under it. More complicated search patterns are
possible with the "**" operator. For more help, please see :help **
:TagManagerAddDb tags **/*.[ch] ./dir1/,./dir2/,./dir3/
Selectively build individual tags in each of these directories
recusively. Paths are relative to current directory. It is also
possible to specify the absolute paths
The sequence of commands has the same effect as the previous
:TagManagerAddDb tags **/*.[ch] ./dir1
:TagManagerAddDb tags **/*.[ch] ./dir2
:TagManagerAddDb tags **/*.[ch] ./dir3
:TagManagerAddDb tags */*.[ch] ./dir4 [not recursive]
Using file lists
:TagManagerAddDb tags files.lst dir1
Uses the "files.lst" file in directory "dir1" for the database
creation. Instead of using regex patterns, file lists can also
specified. Note that these files must be created manually
Shows the current loaded Dbs and their internal index
Use it to remove already loaded Tag Dbs. Index must be
obtained from the show command
Show more details of the database: i.e., list of files tracked
Internal debug log; displays the sequence of
actions/events/system commands executed. In case of anomalous
behavior, please log this.
:let g:TagMgr_CtagsProgName = 'ctags'
Specify the executable for the tag generation application.
:let g:TagMgr_CtagsProgDir = ''
Specify the directory in which the ctags app can be found. If
it is on the path, then it can be left empty.
:let g:TagMgr_CtagsExtraOpts = ''
Extra options for building the database. A better option is to
use the ~/.ctagsrc file to specify extra options; this will be
automatically used for every ctags run.
:let g:TagMgr_AutoTrackDbs = 1
Disable (0) or enable (1). TagManager will automatically setup
the Vim 'tags' variable to reflect the current paths. (More to
come later for this feature)
:let g:TagMgr_LogMaxLines = 30
Internal debug log. Sets the limit for the number of lines.
:let g:TagMgr_SourceListFile = 'files.lst'
When using a regex for file specification, TagManager will
create a file list with this name and then pass it to ctags.
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php