introduce g:airline_inactive_collapse. resolves #129.

This commit is contained in:
Bailey Ling 2013-08-11 14:30:02 +00:00
parent 2a10bfc32f
commit 11e7e67d8d
3 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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'

View File

@ -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',