move tagbar definition into predefined section
This commit is contained in:
parent
9844f14f66
commit
5099fbf1b9
|
@ -84,7 +84,7 @@ function! airline#update_externals()
|
|||
\ : '')
|
||||
\ : ''
|
||||
let g:airline_externals_tagbar = g:airline_enable_tagbar && exists(':Tagbar')
|
||||
\ ? '%(%{tagbar#currenttag("%s","")} '.g:airline_right_alt_sep.'%)' : ''
|
||||
\ ? '%(%{tagbar#currenttag("%s","")} '.g:airline_right_alt_sep.' %)' : ''
|
||||
endfunction
|
||||
|
||||
function! s:getwinvar(winnr, key, ...)
|
||||
|
@ -124,7 +124,7 @@ function! s:get_statusline(winnr, active)
|
|||
let sl.=l:status_color.' %f%m'
|
||||
endif
|
||||
if !s:getwinvar(a:winnr, 'airline_left_only', 0)
|
||||
let sl.='%='.g:airline_externals_tagbar
|
||||
let sl.='%='
|
||||
let sl.=' '.s:get_section(a:winnr, 'x').' '
|
||||
let sl.=l:info_sep_color
|
||||
let sl.=a:active ? g:airline_right_sep : g:airline_right_alt_sep
|
||||
|
|
|
@ -158,8 +158,8 @@ with the usual statusline syntax.
|
|||
let g:airline_section_a (the mode/paste indicator)
|
||||
let g:airline_section_b (the fugitive/lawrencium branch indicator)
|
||||
let g:airline_section_c (bufferline or filename)
|
||||
let g:airline_section_gutter (syntastic, readonly flag, tagbar)
|
||||
let g:airline_section_x (filetype)
|
||||
let g:airline_section_gutter (syntastic, readonly flag)
|
||||
let g:airline_section_x (tagbar, filetype)
|
||||
let g:airline_section_y (fileencoding, fileformat)
|
||||
let g:airline_section_z (percentage, line number, column number)
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ function! s:on_window_changed()
|
|||
call s:check_defined('g:airline_section_b', '%{g:airline_externals_branch}')
|
||||
call s:check_defined('g:airline_section_c', g:airline_externals_bufferline)
|
||||
call s:check_defined('g:airline_section_gutter', '')
|
||||
call s:check_defined('g:airline_section_x', "%{strlen(&filetype)>0?&filetype:''}")
|
||||
call s:check_defined('g:airline_section_x', g:airline_externals_tagbar."%{strlen(&filetype)>0?&filetype:''}")
|
||||
call s:check_defined('g:airline_section_y', "%{strlen(&fenc)>0?&fenc:''}%{strlen(&ff)>0?'['.&ff.']':''}")
|
||||
call s:check_defined('g:airline_section_z', '%3p%% '.g:airline_linecolumn_prefix.'%3l:%3c')
|
||||
let s:airline_initialized = 1
|
||||
|
|
Loading…
Reference in New Issue