Better toggling of powerline fonts
+ Check the value of airline_powerline_fonts not just existence
This commit is contained in:
parent
0dc3a7913d
commit
3920817442
@ -4,7 +4,7 @@
|
|||||||
let s:empty_message = get(g:, 'airline#extensions#branch#empty_message',
|
let s:empty_message = get(g:, 'airline#extensions#branch#empty_message',
|
||||||
\ get(g:, 'airline_branch_empty_message', ''))
|
\ get(g:, 'airline_branch_empty_message', ''))
|
||||||
let s:symbol = get(g:, 'airline#extensions#branch#symbol',
|
let s:symbol = get(g:, 'airline#extensions#branch#symbol',
|
||||||
\ get(g:, 'airline_branch_prefix', exists('g:airline_powerline_fonts') ? ' ' : ''))
|
\ get(g:, 'airline_branch_prefix', get(g:, 'airline_powerline_fonts', 0) ? ' ' : ''))
|
||||||
|
|
||||||
let s:has_fugitive = exists('*fugitive#head')
|
let s:has_fugitive = exists('*fugitive#head')
|
||||||
let s:has_fugitive_detect = exists('*fugitive#detect')
|
let s:has_fugitive_detect = exists('*fugitive#detect')
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
let s:symbol = get(g:, 'airline#extensions#paste#symbol',
|
let s:symbol = get(g:, 'airline#extensions#paste#symbol',
|
||||||
\ get(g:, 'airline_paste_symbol', (exists('g:airline_powerline_fonts') ? ' ' : '').'PASTE'))
|
\ get(g:, 'airline_paste_symbol', (get(g:, 'airline_powerline_fonts', 0) ? ' ' : '').'PASTE'))
|
||||||
|
|
||||||
function! airline#extensions#paste#get_mark()
|
function! airline#extensions#paste#get_mark()
|
||||||
return &paste ? ' ' . s:symbol : ''
|
return &paste ? ' ' . s:symbol : ''
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
" vim: et ts=2 sts=2 sw=2
|
" vim: et ts=2 sts=2 sw=2
|
||||||
|
|
||||||
let s:symbol = get(g:, 'airline#extensions#readonly#symbol',
|
let s:symbol = get(g:, 'airline#extensions#readonly#symbol',
|
||||||
\ get(g:, 'airline_readonly_symbol', exists('g:airline_powerline_fonts') ? '' : 'RO'))
|
\ get(g:, 'airline_readonly_symbol', get(g:, 'airline_powerline_fonts', 0) ? '' : 'RO'))
|
||||||
|
|
||||||
function! airline#extensions#readonly#get_mark()
|
function! airline#extensions#readonly#get_mark()
|
||||||
return &ro ? s:symbol : ''
|
return &ro ? s:symbol : ''
|
||||||
|
@ -11,7 +11,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
let s:symbol = get(g:, 'airline#extensions#whitespace#symbol',
|
let s:symbol = get(g:, 'airline#extensions#whitespace#symbol',
|
||||||
\ get(g:, 'airline_whitespace_symbol', exists('g:airline_powerline_fonts') ? '✹' : '!'))
|
\ get(g:, 'airline_whitespace_symbol', get(g:, 'airline_powerline_fonts', 0) ? '✹' : '!'))
|
||||||
|
|
||||||
let s:checks = get(g:, 'airline#extensions#whitespace#checks', ['indent', 'trailing'])
|
let s:checks = get(g:, 'airline#extensions#whitespace#checks', ['indent', 'trailing'])
|
||||||
|
|
||||||
|
@ -12,14 +12,14 @@ function! s:check_defined(variable, default)
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
call s:check_defined('g:airline_left_sep', exists('g:airline_powerline_fonts')?"":">")
|
call s:check_defined('g:airline_left_sep', get(g:, 'airline_powerline_fonts', 0)?"":">")
|
||||||
call s:check_defined('g:airline_left_alt_sep', exists('g:airline_powerline_fonts')?"":">")
|
call s:check_defined('g:airline_left_alt_sep', get(g:, 'airline_powerline_fonts', 0)?"":">")
|
||||||
call s:check_defined('g:airline_right_sep', exists('g:airline_powerline_fonts')?"":"<")
|
call s:check_defined('g:airline_right_sep', get(g:, 'airline_powerline_fonts', 0)?"":"<")
|
||||||
call s:check_defined('g:airline_right_alt_sep', exists('g:airline_powerline_fonts')?"":"<")
|
call s:check_defined('g:airline_right_alt_sep', get(g:, 'airline_powerline_fonts', 0)?"":"<")
|
||||||
call s:check_defined('g:airline_detect_iminsert', 0)
|
call s:check_defined('g:airline_detect_iminsert', 0)
|
||||||
call s:check_defined('g:airline_detect_modified', 1)
|
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_paste', 1)
|
||||||
call s:check_defined('g:airline_linecolumn_prefix', exists('g:airline_powerline_fonts')?' ':':')
|
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_inactive_collapse', 1)
|
||||||
call s:check_defined('g:airline_exclude_filenames', ['DebuggerWatch','DebuggerStack','DebuggerStatus'])
|
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_filetypes', [])
|
||||||
|
Loading…
Reference in New Issue
Block a user