diff --git a/doc/tagbar.txt b/doc/tagbar.txt index b8aebd7..74e54ea 100644 --- a/doc/tagbar.txt +++ b/doc/tagbar.txt @@ -270,9 +270,11 @@ COMMANDS *tagbar-commands* :TagbarClose *:TagbarClose* Close the Tagbar window if it is open. -:TagbarToggle *:TagbarToggle* -:Tagbar +:TagbarToggle [{flags}] *:TagbarToggle* +:Tagbar [{flags}] Open the Tagbar window if it is closed, or close it if it is open. + Additional behaviour can be specified with the same optional {flags} + argument as :TagbarOpen. :TagbarOpenAutoClose *:TagbarOpenAutoClose* Open the Tagbar window, jump to it and close it on tag selection. This is diff --git a/plugin/tagbar.vim b/plugin/tagbar.vim index 390434b..3c00b40 100644 --- a/plugin/tagbar.vim +++ b/plugin/tagbar.vim @@ -183,8 +183,8 @@ augroup TagbarSession augroup END " Commands {{{1 -command! -nargs=0 Tagbar call tagbar#ToggleWindow() -command! -nargs=0 TagbarToggle call tagbar#ToggleWindow() +command! -nargs=? Tagbar call tagbar#ToggleWindow() +command! -nargs=? TagbarToggle call tagbar#ToggleWindow() command! -nargs=? TagbarOpen call tagbar#OpenWindow() command! -nargs=0 TagbarOpenAutoClose call tagbar#OpenWindow('fcj') command! -nargs=0 TagbarClose call tagbar#CloseWindow()