mirror of
https://github.com/preservim/tagbar.git
synced 2024-11-23 10:41:49 +08:00
Merge branch 'master' of github.com:kianryan/tagbar
This commit is contained in:
commit
e88b81c4f5
|
@ -1726,8 +1726,6 @@ function! s:InitWindow(autoclose) abort
|
|||
setlocal nowrap
|
||||
setlocal winfixwidth
|
||||
setlocal textwidth=0
|
||||
setlocal nocursorline
|
||||
setlocal nocursorcolumn
|
||||
setlocal nospell
|
||||
|
||||
if exists('+relativenumber')
|
||||
|
@ -2515,7 +2513,8 @@ function! s:PrintKinds(typeinfo, fileinfo) abort
|
|||
" only if they are not scope-defining tags (since
|
||||
" those already have an identifier)
|
||||
if !has_key(a:typeinfo.kind2scope, ckind.short)
|
||||
silent put =' [' . ckind.long . ']'
|
||||
silent put =repeat(' ', g:tagbar_indent + 2) .
|
||||
\ '[' . ckind.long . ']'
|
||||
" Add basic tag to allow folding when on the
|
||||
" header line
|
||||
let headertag = s:BaseTag.New(ckind.long)
|
||||
|
@ -2560,7 +2559,7 @@ function! s:PrintKinds(typeinfo, fileinfo) abort
|
|||
if !kindtag.isFolded()
|
||||
for tag in curtags
|
||||
let str = tag.strfmt()
|
||||
silent put =' ' . str
|
||||
silent put =repeat(' ', g:tagbar_indent) . str
|
||||
|
||||
" Save the current tagbar line in the tag for easy
|
||||
" highlighting access
|
||||
|
@ -2583,7 +2582,7 @@ endfunction
|
|||
" s:PrintTag() {{{2
|
||||
function! s:PrintTag(tag, depth, fileinfo, typeinfo) abort
|
||||
" Print tag indented according to depth
|
||||
silent put =repeat(' ', a:depth * 2) . a:tag.strfmt()
|
||||
silent put =repeat(' ', a:depth * g:tagbar_indent) . a:tag.strfmt()
|
||||
|
||||
" Save the current tagbar line in the tag for easy
|
||||
" highlighting access
|
||||
|
@ -2601,8 +2600,8 @@ function! s:PrintTag(tag, depth, fileinfo, typeinfo) abort
|
|||
" are not scope-defining tags (since those already have an
|
||||
" identifier)
|
||||
if !has_key(a:typeinfo.kind2scope, ckind.short)
|
||||
silent put =' ' . repeat(' ', a:depth * 2) .
|
||||
\ '[' . ckind.long . ']'
|
||||
silent put =repeat(' ', (a:depth + 1) * g:tagbar_indent + 2)
|
||||
\ . '[' . ckind.long . ']'
|
||||
" Add basic tag to allow folding when on the header line
|
||||
let headertag = s:BaseTag.New(ckind.long)
|
||||
let headertag.parent = a:tag
|
||||
|
|
|
@ -408,6 +408,18 @@ Example:
|
|||
let g:tagbar_compact = 1
|
||||
<
|
||||
|
||||
*g:tagbar_indent*
|
||||
g:tagbar_indent~
|
||||
Default: 2
|
||||
|
||||
The number of spaces by which each level is indented. This allows making the
|
||||
display more compact or more spacious.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_indent = 1
|
||||
<
|
||||
|
||||
*g:tagbar_expand*
|
||||
g:tagbar_expand~
|
||||
Default: 0
|
||||
|
|
|
@ -66,6 +66,10 @@ if !exists('g:tagbar_compact')
|
|||
let g:tagbar_compact = 0
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_indent')
|
||||
let g:tagbar_indent = 2
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_expand')
|
||||
let g:tagbar_expand = 0
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user