mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-18 12:00:23 +01:00
Add g:tagbar_highlight_follow_insert option (#725)
This adds an option making the highlight in the Tagbar follow the cursor in insert mode as well. This feature is guarded behind an option because it may introduce some delay in the input. GitHub: closes #724
This commit is contained in:
@@ -576,6 +576,10 @@ function! s:CreateAutocommands() abort
|
||||
" was changed by an external command; see commit 17d199f
|
||||
autocmd BufReadPost,BufEnter,CursorHold,FileType * call
|
||||
\ s:AutoUpdate(fnamemodify(expand('<afile>'), ':p'), 0)
|
||||
if g:tagbar_highlight_follow_insert
|
||||
autocmd CursorHoldI * call
|
||||
\ s:AutoUpdate(fnamemodify(expand('<afile>'), ':p'), 0)
|
||||
endif
|
||||
autocmd BufDelete,BufWipeout *
|
||||
\ nested call s:HandleBufDelete(expand('<afile>'), expand('<abuf>'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user