vimctagstagbar

How to display the function name quickly?


I use ctags in my work, TagbarToggle is used to display the function name.

My problem is that when search some keyword in the source code, Can the function name which contains the keyword auto highlighted more quickly?

For example open() ,startpreview() and close() contains keyword "camera", when search the source code, Only when I stop the seach for a short moment, the function focus will changed show which function I was In. Can the focus of function name auto-changed synchronously when I search? Is there some plugin could do so?


Solution

  • The TagBar plugin updates the information on the CursorHold event. You could modify the search commands to trigger that after jumping to the next match:

    :nnoremap <silent> n n:doautocmd TagbarAutoCmds CursorHold<CR>
    :nnoremap <silent> N N:doautocmd TagbarAutoCmds CursorHold<CR>