mirror of
https://github.com/preservim/tagbar.git
synced 2025-02-07 21:38:29 +08:00
Fix for #647: Add g:tagbar_wrap option
This commit is contained in:
parent
30fb229937
commit
22df1b87af
|
@ -954,10 +954,19 @@ function! s:InitWindow(autoclose) abort
|
|||
" Window-local options
|
||||
|
||||
setlocal nolist
|
||||
setlocal nowrap
|
||||
setlocal winfixwidth
|
||||
setlocal nospell
|
||||
|
||||
if g:tagbar_wrap == 0
|
||||
setlocal nowrap
|
||||
else
|
||||
setlocal wrap
|
||||
if exists('+linebreak')
|
||||
setlocal breakindent
|
||||
setlocal breakindentopt=shift:4
|
||||
endif
|
||||
endif
|
||||
|
||||
if g:tagbar_show_linenumbers == 0
|
||||
setlocal nonumber
|
||||
if exists('+relativenumber')
|
||||
|
|
|
@ -882,6 +882,22 @@ Example:
|
|||
>
|
||||
let g:tagbar_use_cache = 0
|
||||
<
|
||||
*g:tagbar_wrap*
|
||||
g:tagbar_wrap~
|
||||
Default: 0
|
||||
|
||||
If set to non-zero, this will enable line wrapping on the tagbar window. This
|
||||
option will use the built-in |wrap| vim option on the tagbar window to
|
||||
enable line wrapping. This also will use the |breakindent| and
|
||||
|breakindentopt| options in vim to set the indentation of the wrapped lines.
|
||||
|
||||
Note: This requires VIM to be compiled with the |+linebreak| option for the
|
||||
wrap intentation to function.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_wrap = 1
|
||||
>
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
HIGHLIGHT COLOURS *tagbar-highlight*
|
||||
|
|
|
@ -109,6 +109,7 @@ function! s:setup_options() abort
|
|||
\ ['zoomwidth', 1],
|
||||
\ ['silent', 0],
|
||||
\ ['use_cache', 1],
|
||||
\ ['wrap', 0],
|
||||
\ ]
|
||||
|
||||
for [opt, val] in options
|
||||
|
|
Loading…
Reference in New Issue
Block a user