Question

I use Vim with ctags to explore the code. I have some key mapping to re-build ctags to be up-to-date. So whenever I don't find a certain tag, I make sure to press Alt+F12 to rebuild the tag, then try again. But I am wondering whether it is possible to automate this task like it is in Visual Studio and other IDEs. I am thinking of making a timer that rebuilds the tags in -say- every 30 minutes. Does anybody know if Vim scripting supports timers?

Also, if you have any suggestion for automating building tags, please share them.

Was it helpful?

Solution

Rather than using a timer, it is better to refresh tags every time you actually save your file, that is the moment you have added or removed tags from your code base.

There is some questions addressing this topic already :

How to automatically update tag file in Vim
How to refresh taglist in vim?

OTHER TIPS

Do it as a scheduled job. Otherwise setup autocmd.

The Timer routine plugin is worth mentioning in that context.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top