clean up how symbols are defined.

This commit is contained in:
Bailey Ling
2013-08-26 23:34:02 -04:00
parent fe24924ad3
commit 6dd4cd5423
7 changed files with 34 additions and 52 deletions

View File

@@ -23,12 +23,20 @@ call s:check_defined('g:airline_right_alt_sep', get(g:, 'airline_powerline_fonts
call s:check_defined('g:airline_detect_modified', 1)
call s:check_defined('g:airline_detect_paste', 1)
call s:check_defined('g:airline_detect_iminsert', 0)
call s:check_defined('g:airline_linecolumn_prefix', get(g:, 'airline_powerline_fonts', 0)?' ':':')
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)
call s:check_defined('g:airline_symbols', {})
call extend(g:airline_symbols, {
\ 'paste': get(g:, 'airline_paste_symbol', g:airline_left_alt_sep.' PASTE'),
\ 'readonly': get(g:, 'airline_readonly_symbol', get(g:, 'airline_powerline_fonts', 0) ? '' : 'RO'),
\ 'whitespace': get(g:, 'airline_powerline_fonts', 0) ? '✹' : '!',
\ 'linenr': get(g:, 'airline_linecolumn_prefix', get(g:, 'airline_powerline_fonts', 0) ? '' : ':' ),
\ 'branch': get(g:, 'airline_branch_prefix', get(g:, 'airline_powerline_fonts', 0) ? '' : ''),
\ }, 'keep')
call s:check_defined('g:airline_mode_map', {
\ '__' : '------',
\ 'n' : 'NORMAL',
@@ -50,13 +58,13 @@ call s:check_defined('g:airline_theme_map', {
\ '.*solarized.*': 'solarized',
\ })
call s:check_defined('g:airline_section_a', '%{get(w:, "airline_current_mode", "")}%{airline#fragments#get_paste()}%{airline#fragments#get_iminsert()}')
call s:check_defined('g:airline_section_a', '%{get(w:,"airline_current_mode","")}%{airline#fragments#get_paste()}%{airline#fragments#get_iminsert()}')
call s:check_defined('g:airline_section_b', '')
call s:check_defined('g:airline_section_c', '%f%m')
call s:check_defined('g:airline_section_gutter', '%=')
call s:check_defined('g:airline_section_gutter', '%#airline_file#%{airline#fragments#get_readonly()}%=')
call s:check_defined('g:airline_section_x', "%{strlen(&filetype)>0?&filetype:''}")
call s:check_defined('g:airline_section_y', "%{strlen(&fenc)>0?&fenc:''}%{strlen(&ff)>0?'['.&ff.']':''}")
call s:check_defined('g:airline_section_z', '%3p%% '.g:airline_linecolumn_prefix.'%3l:%3c')
call s:check_defined('g:airline_section_z', '%3p%% %{g:airline_symbols.linenr} %3l:%3c')
call s:check_defined('g:airline_section_warning', '__')
let s:airline_initialized = 0