mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
Add auto-previewing mode, closes #161
This commit is contained in:
@@ -967,6 +967,10 @@ function! s:CreateAutocommands() abort
|
||||
autocmd WinEnter __Tagbar__ call s:SetStatusLine('current')
|
||||
autocmd WinLeave __Tagbar__ call s:SetStatusLine('noncurrent')
|
||||
|
||||
if g:tagbar_autopreview
|
||||
autocmd CursorMoved __Tagbar__ nested call s:ShowInPreviewWin()
|
||||
endif
|
||||
|
||||
autocmd WinEnter * if bufwinnr('__Tagbar__') == -1 |
|
||||
\ call s:ShrinkIfExpanded() |
|
||||
\ endif
|
||||
|
||||
@@ -564,6 +564,18 @@ Example:
|
||||
let g:tagbar_autoshowtag = 1
|
||||
<
|
||||
|
||||
*g:tagbar_autopreview*
|
||||
g:tagbar_autopreview~
|
||||
Default: 0
|
||||
|
||||
If this variable is set to 1 then moving the cursor in the Tagbar window will
|
||||
automatically show the current tag in the preview window.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_autopreview = 1
|
||||
<
|
||||
|
||||
*g:tagbar_updateonsave_maxlines*
|
||||
g:tagbar_updateonsave_maxlines~
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ endfunction
|
||||
let s:options = [
|
||||
\ ['autoclose', 0],
|
||||
\ ['autofocus', 0],
|
||||
\ ['autopreview', 0],
|
||||
\ ['autoshowtag', 0],
|
||||
\ ['compact', 0],
|
||||
\ ['expand', 0],
|
||||
|
||||
Reference in New Issue
Block a user