diff --git a/autoload/airline.vim b/autoload/airline.vim index c06db9b..0d6f8d2 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -71,9 +71,9 @@ endfunction function! airline#update_externals() let g:airline_externals_bufferline = g:airline_enable_bufferline && exists('*bufferline#get_status_string') - \ ? '%{bufferline#refresh_status()}'.bufferline#get_status_string() - \ : "%f%m" - let g:airline_externals_syntastic = g:airline_enable_syntastic && exists('*SyntasticStatuslineFlag') ? '%{SyntasticStatuslineFlag()}' : '' + \ ? '%{bufferline#refresh_status()}'.bufferline#get_status_string() : "%f%m" + let g:airline_externals_syntastic = g:airline_enable_syntastic && exists('*SyntasticStatuslineFlag') + \ ? '%{SyntasticStatuslineFlag()}' : '' let g:airline_externals_branch = g:airline_enable_branch \ ? (exists('*fugitive#head') && strlen(fugitive#head()) > 0 \ ? g:airline_branch_prefix.fugitive#head() @@ -81,6 +81,8 @@ function! airline#update_externals() \ ? g:airline_branch_prefix.lawrencium#statusline() \ : '') \ : '' + let g:airline_externals_tagbar = g:airline_enable_tagbar && exists(':Tagbar') + \ ? '%(%{tagbar#currenttag("%s","")} '.g:airline_right_alt_sep.'%)' : '' endfunction function! s:getwinvar(winnr, key, ...) @@ -120,7 +122,8 @@ 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.='%= '.s:get_section(a:winnr, 'x').' ' + let sl.='%='.g:airline_externals_tagbar + 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 let sl.=l:info_color diff --git a/doc/airline.txt b/doc/airline.txt index 9e6f9d5..61a9c13 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -6,24 +6,23 @@ INTRODUCTION *airline* There's already powerline , why yet another statusline? -* it's 100% vimscript; no python needed. -* it's small. i want the core plugin to be less than 200 lines as a rule. -* it gets you 90% of the way there; in addition to all the standard goodies, - it integrates with a variety of popular plugins, including: +* 100% vimscript; no python needed. +* small. i want the core plugin to be less than 200 lines as a rule. +* integrates with a variety of popular plugins, including: * fugitve * syntastic * vim-bufferline * unite * ctrlp * lawrencium -* it looks good with regular fonts, and provides configuration points so you +* looks good with regular fonts, and provides configuration points so you can use unicode or powerline symbols. -* it's fast to load, taking roughly 1ms. by comparison, powerline needs - 60ms on the same machine. -* it's fully customizable; if you know a little |statusline| syntax you can +* fast to load, taking roughly 1ms. by comparison, powerline needs 60ms + on the same machine. +* fully customizable; if you know a little |statusline| syntax you can tweak it to your needs. -* it's trivial to write colorschemes; for a minimal theme you need to edit - 9 lines of colors. (please send pull requests if you create new themes!) +* trivial to write colorschemes; for a minimal theme you need to edit + 9 lines of colors. (please send pull requests) ============================================================================== NAME *airline-name* @@ -59,6 +58,11 @@ values): let g:airline_enable_syntastic=1 < +* enable/disable tagbar integration +> + let g:airline_enable_tagbar=1 +< + * enable modified detection > let g:airline_detect_modified=1 diff --git a/plugin/airline.vim b/plugin/airline.vim index e618f92..84c0567 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -18,6 +18,7 @@ call s:check_defined('g:airline_right_alt_sep', exists('g:airline_powerline_font call s:check_defined('g:airline_enable_bufferline', 1) call s:check_defined('g:airline_enable_branch', 1) call s:check_defined('g:airline_enable_syntastic', 1) +call s:check_defined('g:airline_enable_tagbar', 1) call s:check_defined('g:airline_detect_iminsert', 0) call s:check_defined('g:airline_detect_modified', 1) call s:check_defined('g:airline_detect_paste', 1)