mirror of
https://github.com/preservim/tagbar.git
synced 2025-02-17 04:42:48 +08:00
Make preview window position configurable
This commit is contained in:
parent
0377f19d74
commit
f3250b2dd1
|
@ -3010,7 +3010,7 @@ function! s:ShowInPreviewWin() abort
|
|||
return
|
||||
endif
|
||||
|
||||
execute 'topleft pedit +' . taginfo.fields.line . ' ' .
|
||||
execute g:tagbar_previewwin_pos . ' pedit +' . taginfo.fields.line . ' ' .
|
||||
\ s:known_files.getCurrent(0).fpath
|
||||
endfunction
|
||||
|
||||
|
|
|
@ -564,6 +564,24 @@ Example:
|
|||
let g:tagbar_autoshowtag = 1
|
||||
<
|
||||
|
||||
*g:tagbar_previewwin_pos*
|
||||
g:tagbar_previewwin_pos~
|
||||
Default: topleft
|
||||
|
||||
The position of the preview window. Valid values are the window splitting
|
||||
commands that are described starting from |:vertical|. Set it to an empty
|
||||
string to use the options 'splitbelow' and 'splitright'.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_previewwin_pos = "aboveleft"
|
||||
<
|
||||
If you want to disable line numbers in the preview window put something like
|
||||
this into your vimrc:
|
||||
>
|
||||
autocmd BufWinEnter * if &previewwindow | setlocal nonumber | endif
|
||||
<
|
||||
|
||||
*g:tagbar_autopreview*
|
||||
g:tagbar_autopreview~
|
||||
Default: 0
|
||||
|
|
|
@ -58,6 +58,7 @@ let s:options = [
|
|||
\ ['foldlevel', 99],
|
||||
\ ['indent', 2],
|
||||
\ ['left', 0],
|
||||
\ ['previewwin_pos', 'topleft'],
|
||||
\ ['show_visibility', 1],
|
||||
\ ['show_linenumbers', 0],
|
||||
\ ['singleclick', 0],
|
||||
|
|
Loading…
Reference in New Issue
Block a user