mirror of
https://github.com/preservim/tagbar.git
synced 2024-11-23 10:21:00 +08:00
Make 'open' commands a bit more intuitive
This commit is contained in:
parent
e690a5e97d
commit
f3c1a93017
|
@ -1597,9 +1597,6 @@ function! s:OpenWindow(flags) abort
|
|||
if tagbarwinnr != -1
|
||||
if winnr() != tagbarwinnr && jump
|
||||
call s:winexec(tagbarwinnr . 'wincmd w')
|
||||
if autoclose
|
||||
let w:autoclose = autoclose
|
||||
endif
|
||||
call s:HighlightTag(1, curline)
|
||||
endif
|
||||
call s:LogDebugMessage("OpenWindow finished, Tagbar already open")
|
||||
|
|
|
@ -241,7 +241,8 @@ COMMANDS *tagbar-commands*
|
|||
were set to 1)
|
||||
'j' Jump to Tagbar window if already open
|
||||
'c' Close Tagbar on tag selection (just as if |g:tagbar_autoclose| were
|
||||
set to 1, but doesn't imply 'f')
|
||||
set to 1, but doesn't imply 'f'), but only if the Tagbar window was
|
||||
opened using this command.
|
||||
|
||||
For example, the following command would always jump to the Tagbar window,
|
||||
opening it first if necessary, but keep it open after selecting a tag
|
||||
|
@ -256,7 +257,7 @@ COMMANDS *tagbar-commands*
|
|||
|
||||
:TagbarOpenAutoClose *:TagbarOpenAutoClose*
|
||||
Open the Tagbar window, jump to it and close it on tag selection. This is
|
||||
an alias for ":TagbarOpen fc".
|
||||
an alias for ":TagbarOpen fjc".
|
||||
|
||||
:TagbarSetFoldlevel[!] {number} *:TagbarSetFoldlevel*
|
||||
Set the foldlevel of the tags of the current file to {number}. The
|
||||
|
|
|
@ -103,7 +103,7 @@ augroup END
|
|||
" Commands {{{1
|
||||
command! -nargs=0 TagbarToggle call tagbar#ToggleWindow()
|
||||
command! -nargs=? TagbarOpen call tagbar#OpenWindow(<f-args>)
|
||||
command! -nargs=0 TagbarOpenAutoClose call tagbar#OpenWindow('fc')
|
||||
command! -nargs=0 TagbarOpenAutoClose call tagbar#OpenWindow('fcj')
|
||||
command! -nargs=0 TagbarClose call tagbar#CloseWindow()
|
||||
command! -nargs=1 -bang TagbarSetFoldlevel call tagbar#SetFoldLevel(<args>, <bang>0)
|
||||
command! -nargs=0 TagbarShowTag call tagbar#OpenParents()
|
||||
|
|
Loading…
Reference in New Issue
Block a user