mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
Add documentation for hide_nonpublic
Also indicate in the statusline if non-public tags are currently hidden.
This commit is contained in:
@@ -2797,6 +2797,7 @@ function! s:PrintHelp() abort
|
||||
silent put ='\" ' . s:get_map_str('nexttag') . ': Go to next top-level tag'
|
||||
silent put ='\" ' . s:get_map_str('prevtag') . ': Go to previous top-level tag'
|
||||
silent put ='\" ' . s:get_map_str('showproto') . ': Display tag prototype'
|
||||
silent put ='\" ' . s:get_map_str('hidenonpublic') . ': Hide non-public tags'
|
||||
silent put ='\"'
|
||||
silent put ='\" ---------- Folds ----------'
|
||||
silent put ='\" ' . s:get_map_str('openfold') . ': Open fold'
|
||||
@@ -3654,6 +3655,7 @@ endfunction
|
||||
function! s:ToggleHideNonPublicTags() abort
|
||||
let g:tagbar_hide_nonpublic = !g:tagbar_hide_nonpublic
|
||||
call s:RenderKeepView()
|
||||
call s:SetStatusLine('current')
|
||||
endfunction
|
||||
|
||||
" s:IsValidFile() {{{2
|
||||
@@ -3722,7 +3724,8 @@ function! s:SetStatusLine(current)
|
||||
let &l:statusline = call(g:tagbar_status_func, args)
|
||||
else
|
||||
let colour = current ? '%#StatusLine#' : '%#StatusLineNC#'
|
||||
let text = colour . '[' . sort . '] ' . fname
|
||||
let hide = g:tagbar_hide_nonpublic ? '[h] ' : ''
|
||||
let text = colour . '[' . sort . '] ' . hide . fname
|
||||
let &l:statusline = text
|
||||
endif
|
||||
|
||||
|
||||
@@ -331,6 +331,9 @@ P Open the tag in a |preview-window|.
|
||||
<Space> Display the prototype of the current tag (i.e. the line defining
|
||||
it) in the command line.
|
||||
Map option: tagbar_map_showproto
|
||||
h Hide tags that are declared non-public. Tags without any
|
||||
visibility information will still be shown.
|
||||
Map option: tagbar_map_hidenonpublic
|
||||
+/zo Open the fold under the cursor.
|
||||
Map option: tagbar_map_openfold
|
||||
-/zc Close the fold under the cursor or the current one if there is
|
||||
@@ -506,6 +509,19 @@ Example:
|
||||
let g:tagbar_show_linenumbers = 2
|
||||
<
|
||||
|
||||
*g:tagbar_hide_nonpublic*
|
||||
g:tagbar_hide_nonpublic~
|
||||
Default: 0
|
||||
|
||||
Hide tags that are declared non-public. Tags without any visibility
|
||||
information will still be shown. This can also be toggled with a key, see
|
||||
|tagbar-keys|.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_hide_nonpublic = 1
|
||||
<
|
||||
|
||||
*g:tagbar_expand*
|
||||
g:tagbar_expand~
|
||||
Default: 0
|
||||
|
||||
Reference in New Issue
Block a user