mirror of
https://github.com/vim-airline/vim-airline-themes.git
synced 2024-12-12 13:23:35 +08:00
DRY
This commit is contained in:
parent
6d75740257
commit
9f8e9fda96
|
@ -3,39 +3,22 @@ if &cp || v:version < 702 || (exists('g:loaded_airline') && g:loaded_airline)
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let g:loaded_airline = 1
|
let g:loaded_airline = 1
|
||||||
if !exists('g:airline_left_sep')
|
function! s:check_defined(variable, default)
|
||||||
let g:airline_left_sep = exists('g:airline_powerline_fonts')?"":">"
|
if !exists(a:variable)
|
||||||
endif
|
let {a:variable} = a:default
|
||||||
if !exists('g:airline_right_sep')
|
endif
|
||||||
let g:airline_right_sep = exists('g:airline_powerline_fonts')?"":"<"
|
endfunction
|
||||||
endif
|
call s:check_defined('g:airline_left_sep', exists('g:airline_powerline_fonts')?"":">")
|
||||||
if !exists('g:airline_enable_fugitive')
|
call s:check_defined('g:airline_right_sep', exists('g:airline_powerline_fonts')?"":"<")
|
||||||
let g:airline_enable_fugitive = 1
|
call s:check_defined('g:airline_enable_fugitive', 1)
|
||||||
endif
|
call s:check_defined('g:airline_enable_syntastic', 1)
|
||||||
if !exists('g:airline_enable_syntastic')
|
call s:check_defined('g:airline_fugitive_prefix', exists('g:airline_powerline_fonts')?' ':' ')
|
||||||
let g:airline_enable_syntastic = 1
|
call s:check_defined('g:airline_readonly_symbol', exists('g:airline_powerline_fonts')?'':'RO')
|
||||||
endif
|
call s:check_defined('g:airline_linecolumn_prefix', exists('g:airline_powerline_fonts')?' ':':')
|
||||||
if !exists('g:airline_fugitive_prefix')
|
call s:check_defined('g:airline_theme', 'default')
|
||||||
let g:airline_fugitive_prefix = exists('g:airline_powerline_fonts')?' ':' '
|
call s:check_defined('g:airline_modified_detection', 1)
|
||||||
endif
|
call s:check_defined('g:airline_exclude_filenames', ['DebuggerWatch','DebuggerStack','DebuggerStatus'])
|
||||||
if !exists('g:airline_readonly_symbol')
|
call s:check_defined('g:airline_exclude_filetypes', ['qf','netrw','diff','undotree','gundo','nerdtree','tagbar'])
|
||||||
let g:airline_readonly_symbol = exists('g:airline_powerline_fonts')?'':'RO'
|
|
||||||
endif
|
|
||||||
if !exists('g:airline_linecolumn_prefix')
|
|
||||||
let g:airline_linecolumn_prefix = exists('g:airline_powerline_fonts')?' ':':'
|
|
||||||
endif
|
|
||||||
if !exists('g:airline_theme')
|
|
||||||
let g:airline_theme = 'default'
|
|
||||||
endif
|
|
||||||
if !exists('g:airline_modified_detection')
|
|
||||||
let g:airline_modified_detection=1
|
|
||||||
endif
|
|
||||||
if !exists('g:airline_exclude_filenames')
|
|
||||||
let g:airline_exclude_filenames = ['DebuggerWatch','DebuggerStack','DebuggerStatus']
|
|
||||||
endif
|
|
||||||
if !exists('g:airline_exclude_filetypes')
|
|
||||||
let g:airline_exclude_filetypes = ['qf','netrw','diff','undotree','gundo','nerdtree','tagbar']
|
|
||||||
endif
|
|
||||||
|
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user