From f9718e6b656dadf4bc32c041aae774e66855d694 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Tue, 27 Aug 2013 23:25:55 +0000 Subject: [PATCH] place tagbar into parts. --- autoload/airline/extensions/tagbar.vim | 4 ++-- plugin/airline.vim | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/autoload/airline/extensions/tagbar.vim b/autoload/airline/extensions/tagbar.vim index f1ad0e7..bf7efee 100644 --- a/autoload/airline/extensions/tagbar.vim +++ b/autoload/airline/extensions/tagbar.vim @@ -20,7 +20,7 @@ function! airline#extensions#tagbar#init(ext) call a:ext.add_inactive_statusline_func('airline#extensions#tagbar#inactive_apply') let g:tagbar_status_func = 'airline#extensions#tagbar#get_status' - let g:airline_section_x = '%(%{get(w:,"airline_active",0) ? tagbar#currenttag("%s","") : ""} ' - \ .g:airline_right_alt_sep.' %)'.g:airline_section_x + let g:airline_parts.tagbar = '%(%{get(w:,"airline_active",0) ? tagbar#currenttag("%s","") : ""} ' + \ .g:airline_right_alt_sep.' %)' endfunction diff --git a/plugin/airline.vim b/plugin/airline.vim index 20c69a2..305fe38 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -47,6 +47,7 @@ call extend(g:airline_parts, { \ 'file': '%f%m', \ 'hunks': '', \ 'branch': '', + \ 'tagbar': '', \ }, 'keep') call s:check_defined('g:airline_mode_map', {}) @@ -83,7 +84,7 @@ function! s:init() call s:check_defined('g:airline_section_b', (g:airline_parts.hunks).(g:airline_parts.branch)) call s:check_defined('g:airline_section_c', (g:airline_parts.file)) call s:check_defined('g:airline_section_gutter', ' '.(g:airline_parts.readonly).'%=') - call s:check_defined('g:airline_section_x', '%{&filetype}') + call s:check_defined('g:airline_section_x', (g:airline_parts.tagbar).'%{&filetype}') call s:check_defined('g:airline_section_y', g:airline_parts.ffenc) call s:check_defined('g:airline_section_z', '%3p%% %{g:airline_symbols.linenr} %3l:%3c') call s:check_defined('g:airline_section_warning', '__')