Intelligent-Tags is a project mainly written in Vim Script, it's free.
Automated Tag creation/inclusion
This is a mirror of http://www.vim.org/scripts/script.php?script_id=3662
Project Home: https://github.com/bahejl/Intelligent_Tags
Intelligent Tags is designed to handle creating tags and setting the 'tag' option for you. Tradionally, you would run ctags on your project at regular intervals (or in a cron job), but I struggled with this approach for several reasons:
Intelligent Tags solves these problems by using two tools. First, it uses Vim's built-in options 'include', and 'includeexpr' to find any/all include files, and then searches those includes for includes, etc. The depth of this search can be set by the user to any level using the |Itags_Depth| variable. To save time, Intelligent Tags will create an .incl file for every file examined. This file is simply a cache that lets Intelligent Tags avoid re-scanning for include files unless it is necessary. In order for any of this to work properly, Vim's path option must be set correctly. You can check if it is correct by running the Vim command |:checkpath|. If you use Intelligent Tags with an incorrect path, the information stored in the cached .incl files will be incorrect, and you will need to run the |ItagsRegenIncl| command after correcting your path to correct the cached informaiton. For more information on setting your path type ':h path'.
The second tool Intelligent Tags uses is exhuberant ctags. Intelligent Tags uses exhuberant ctags' report of supported languages to automatically add a FileType autocommand for each type of supported file. I want my tags updated as soon as I make a change to a file, but if you use the tradional method of having a single tags file per project that can take quite a while -- especially for a large project. To work around that problem, Intelligent Tags creates a seperate tags file for each source file, and only updates those that are out of date.
This methodolgy begins to break down for some languages, such as C, where the following problems exist:
In the end, when you open any exhuberant ctags supported file, intelligent Tags will generated generate any tags files necessary and update the 'tags' option for you, and you don't have to do a thing!