mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-26 10:13:42 +08:00
Merge pull request #174 from jacobwalker0814/powerline_fonts
Better toggling of powerline fonts
This commit is contained in:
commit
fa57fdb634
|
@ -4,7 +4,7 @@
|
|||
let s:empty_message = get(g:, 'airline#extensions#branch#empty_message',
|
||||
\ get(g:, 'airline_branch_empty_message', ''))
|
||||
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_detect = exists('*fugitive#detect')
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
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()
|
||||
return &paste ? ' ' . s:symbol : ''
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
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()
|
||||
return &ro ? s:symbol : ''
|
||||
|
|
|
@ -11,7 +11,7 @@ else
|
|||
endif
|
||||
|
||||
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'])
|
||||
|
||||
|
|
|
@ -12,14 +12,14 @@ function! s:check_defined(variable, default)
|
|||
endif
|
||||
endfunction
|
||||
|
||||
call s:check_defined('g:airline_left_sep', exists('g:airline_powerline_fonts')?"":">")
|
||||
call s:check_defined('g:airline_left_alt_sep', exists('g:airline_powerline_fonts')?"":">")
|
||||
call s:check_defined('g:airline_right_sep', exists('g:airline_powerline_fonts')?"":"<")
|
||||
call s:check_defined('g:airline_right_alt_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', get(g:, 'airline_powerline_fonts', 0)?"":">")
|
||||
call s:check_defined('g:airline_right_sep', get(g:, 'airline_powerline_fonts', 0)?"":"<")
|
||||
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_modified', 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_exclude_filenames', ['DebuggerWatch','DebuggerStack','DebuggerStatus'])
|
||||
call s:check_defined('g:airline_exclude_filetypes', [])
|
||||
|
|
Loading…
Reference in New Issue
Block a user