From aa8c59220148640d66e779c1da495e6c5dfa78a9 Mon Sep 17 00:00:00 2001 From: raven42 Date: Tue, 27 Oct 2020 14:14:39 -0500 Subject: [PATCH] Help visibility (#686) Closes #410 Add `g:tagbar_help_visibility` option to always show the help dialog --- autoload/tagbar.vim | 6 +++--- doc/tagbar.txt | 8 ++++++++ plugin/tagbar.vim | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 0d4bba3..9161141 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -1998,7 +1998,7 @@ function! s:PrintKinds(typeinfo, fileinfo) abort endfor let outstr = join(output, "\n") - if g:tagbar_compact && s:short_help + if g:tagbar_compact && !g:tagbar_help_visibility && s:short_help silent 0put =outstr else silent put =outstr @@ -2058,10 +2058,10 @@ endfunction " s:PrintHelp() {{{2 function! s:PrintHelp() abort - if !g:tagbar_compact && s:short_help + if !g:tagbar_compact && !g:tagbar_help_visibility && s:short_help silent 0put ='\" Press ' . s:get_map_str('help') . ' for help' silent put _ - elseif !s:short_help + elseif g:tagbar_help_visibility || !s:short_help silent 0put ='\" Tagbar keybindings' silent put ='\"' silent put ='\" --------- General ---------' diff --git a/doc/tagbar.txt b/doc/tagbar.txt index f100076..aa7ff00 100644 --- a/doc/tagbar.txt +++ b/doc/tagbar.txt @@ -631,7 +631,15 @@ Example: > let g:tagbar_compact = 1 < + *g:tagbar_help_visibility* +g:tagbar_help_visibility~ +Default: 0 +Setting this option will cause the full help information to be displayed all +the time in the tagbar window. +> + let g:tagbar_help_visibility = 1 +< *g:tagbar_indent* g:tagbar_indent~ Default: 2 diff --git a/plugin/tagbar.vim b/plugin/tagbar.vim index 40eb9b6..8edef9d 100644 --- a/plugin/tagbar.vim +++ b/plugin/tagbar.vim @@ -97,6 +97,7 @@ function! s:setup_options() abort \ ['height', 10], \ ['indent', 2], \ ['left', 0], + \ ['help_visibility', 0], \ ['position', default_pos], \ ['previewwin_pos', previewwin_pos], \ ['scopestrs', {}],