I am using Vim with TagList in development. TagList seems to be very nice, but one problem with that is that it takes a long time to refreshe, so if for example I mean from the function A to the function B in the same file, it takes around 5 seconds for TagList to get updated. Is there anyway to make this interval shorter, like half a second for example?
I have the same problem as yours and inspired by ThePosey's answer.
You can find the "autocmd" command on line 1678 in the taglist.vim which looks
autocmd BufEnter * call s:Tlist_Refresh()
that waits for a BufEnter event to refresh the tag window.
I just modified it to
autocmd BufEnter,CursorMovedI * call s:Tlist_Refresh()
and it will toggle Tlist_Refresh while your cursor is moving in insert mode. I deleted CursorMoved event for it hinders too many other commands.
I think this should meet the requirement for most cases. The side effect is some commands that requires moving cursor becomes invalid.
Edit:
An easier way would be put this line in the .vimrc file:
autocmd CursorMovedI * silent! TlistHighlightTag
And BTW, there is no command TlistRefresh, use TlistHighlightTag instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With