1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-17 11:30:28 +01:00

Add option to arrange Tagbar window vertically

This commit is contained in:
Jan Larres
2014-11-08 21:30:17 +13:00
parent 5283bc834a
commit f933907afa
3 changed files with 53 additions and 10 deletions

View File

@@ -48,6 +48,11 @@ function! s:init_var(var, value) abort
endif
endfunction
if !exists('g:tagbar_vertical') || g:tagbar_vertical == 0
let s:previewwin_pos = 'topleft'
else
let s:previewwin_pos = 'rightbelow vertical'
endif
let s:options = [
\ ['autoclose', 0],
\ ['autofocus', 0],
@@ -59,15 +64,17 @@ let s:options = [
\ ['hide_nonpublic', 0],
\ ['indent', 2],
\ ['left', 0],
\ ['previewwin_pos', 'topleft'],
\ ['previewwin_pos', s:previewwin_pos],
\ ['show_visibility', 1],
\ ['show_linenumbers', 0],
\ ['singleclick', 0],
\ ['sort', 1],
\ ['systemenc', &encoding],
\ ['vertical', 0],
\ ['width', 40],
\ ['zoomwidth', 1],
\ ]
unlet s:previewwin_pos
for [opt, val] in s:options
call s:init_var(opt, val)