Quick ctags question. Google did not reveal the answer. Ctags is awesome to browse a complete source file. But what about a file that is currently being worked on. Is there a way to dynamically update the ctags file each time a new function/variable is added?
You can write an autocmd
that is triggered after x
seconds of inactivity or after each <Esc>
:
autocmd CursorHold *.js :!ctags -R .
But it is a bit messy.
See :help autocmd
for more information and a list of possible events.
Also see the EasyTags plugin (that I use), or AutoTag, or Indexer which are a lot cleaner and smarter.