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?
You can try setting the updatetime to 1000ms. I did this with a big file and everything is working very well, the refresh occurs every second;
set ut=1000
see if it helps
ut=250
to get the UI responsiveness I wanted. if i really wanted it to be not noticeable I would set it to ut=100
because events that are <250 ms are generally not noticeable by humans)). –
Thundershower 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.
autocmd BufEnter,CursorMoved,CursorMovedI * silent! TlistHighlightTag
–
Thundershower You can bind a key to the function :TlistRefresh
map <silent> <F1> :TlistRefresh<CR>
Kind of an old question, but for taglist 4.6 (at least) the update period is controlled by the updatetime (autocmd CursorHold .. line 1735)
For interactivity, Tom Yu's answer is probably the best solution.
© 2022 - 2024 — McMap. All rights reserved.