mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-16 00:37:08 +08:00
@@ -25,6 +25,7 @@ function! airline#init#bootstrap()
|
||||
call s:check_defined('g:airline_detect_paste', 1)
|
||||
call s:check_defined('g:airline_detect_crypt', 1)
|
||||
call s:check_defined('g:airline_detect_spell', 1)
|
||||
call s:check_defined('g:airline_detect_spelllang', 1)
|
||||
call s:check_defined('g:airline_detect_iminsert', 0)
|
||||
call s:check_defined('g:airline_inactive_collapse', 1)
|
||||
call s:check_defined('g:airline_exclude_filenames', ['DebuggerWatch','DebuggerStack','DebuggerStatus'])
|
||||
|
||||
@@ -65,7 +65,17 @@ function! airline#parts#paste()
|
||||
endfunction
|
||||
|
||||
function! airline#parts#spell()
|
||||
return g:airline_detect_spell && &spell ? g:airline_symbols.spell : ''
|
||||
let spelllang = g:airline_detect_spelllang ? printf(" [%s]", toupper(substitute(&spelllang, ',', '/', 'g'))) : ''
|
||||
if g:airline_detect_spell && &spell
|
||||
if winwidth(0) >= 90
|
||||
return g:airline_symbols.spell . spelllang
|
||||
elseif winwidth(0) >= 70
|
||||
return g:airline_symbols.spell
|
||||
else
|
||||
return split(g:airline_symbols.spell, '\zs')[0]
|
||||
endif
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! airline#parts#iminsert()
|
||||
|
||||
Reference in New Issue
Block a user