mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-23 09:01:22 +08:00
redefine ffenc as a function (#235).
This commit is contained in:
parent
dbd9121c05
commit
697e08a83c
|
@ -67,7 +67,7 @@ function! airline#init#bootstrap()
|
|||
\ 'highlight': 'airline_file',
|
||||
\ })
|
||||
call airline#parts#define_raw('file', '%f%m')
|
||||
call airline#parts#define_raw('ffenc', '%{printf("%s%s",&fenc,strlen(&ff)>0?"[".&ff."]":"")}')
|
||||
call airline#parts#define_function('ffenc', 'airline#parts#ffenc')
|
||||
call airline#parts#define_empty(['hunks', 'branch', 'tagbar', 'syntastic', 'whitespace'])
|
||||
endfunction
|
||||
|
||||
|
|
|
@ -61,3 +61,7 @@ function! airline#parts#filetype()
|
|||
return &filetype
|
||||
endfunction
|
||||
|
||||
function! airline#parts#ffenc()
|
||||
return printf('%s%s', &fenc, strlen(&ff) > 0 ? '['.&ff.']' : '')
|
||||
endfunction
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user