mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 09:09:22 +08:00
introduce g:airline_inactive_collapse. resolves #129.
This commit is contained in:
parent
2a10bfc32f
commit
11e7e67d8d
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue
Block a user