diff --git a/autoload/airline.vim b/autoload/airline.vim index 82f644c9..29e4e144 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -79,7 +79,7 @@ function! s:get_statusline(winnr, active) let l:file_flag_color = a:active ? "%#Al7#" : "%#Al7_inactive#" let sl = '%{airline#update_highlight()}' - if s:getwinvar(a:winnr, 'airline_render_left', a:active) + if s:getwinvar(a:winnr, 'airline_render_left', a:active || (!a:active && !g:airline_inactive_collapse)) let sl.=l:mode_color.s:get_section(a:winnr, 'a') let sl.='%{g:airline_detect_paste && &paste ? g:airline_paste_symbol." " : ""}' let sl.=l:mode_sep_color diff --git a/doc/airline.txt b/doc/airline.txt index 42da6786..c42836ad 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -85,6 +85,12 @@ values): let g:airline_detect_whitespace=2 "icon only < +* determine whether inactive windows should have the left section collapsed to + only the filename of that buffer. +> + let g:airline_inactive_collapse=1 +< + * change the default theme > let g:airline_theme='dark' diff --git a/plugin/airline.vim b/plugin/airline.vim index 3a037a11..dbd88847 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -35,6 +35,7 @@ call s:check_defined('g:airline_readonly_symbol', exists('g:airline_powerline_fo call s:check_defined('g:airline_linecolumn_prefix', exists('g:airline_powerline_fonts')?' ':':') call s:check_defined('g:airline_paste_symbol', (exists('g:airline_powerline_fonts') ? ' ' : '').'PASTE') call s:check_defined('g:airline_theme', 'dark') +call s:check_defined('g:airline_inactive_collapse', 1) call s:check_defined('g:airline_exclude_filenames', ['DebuggerWatch','DebuggerStack','DebuggerStatus']) call s:check_defined('g:airline_exclude_filetypes', []) call s:check_defined('g:airline_exclude_preview', 0) @@ -42,7 +43,7 @@ call s:check_defined('g:airline_statusline_funcrefs', []) call s:check_defined('g:airline_exclude_funcrefs', []) call s:check_defined('g:airline_mode_map', { - \ '__' : ' ---- ', + \ '__' : '------', \ 'n' : 'NORMAL', \ 'i' : 'INSERT', \ 'R' : 'REPLACE',