mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-10-13 16:18:54 +08:00
shorten filetype for smaller screens
This commit is contained in:
1 parent
8fda614d0d
commit
fdd29caef4
1 file changed
+1
-2
@@ -82,10 +82,9 @@ function! airline#parts#readonly()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#parts#filetype()
|
function! airline#parts#filetype()
|
||||||
return &filetype
|
return winwidth(0) < 100 && strlen(&filetype) > 3 ? matchstr(&filetype, '...'). '…' : &filetype
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#parts#ffenc()
|
function! airline#parts#ffenc()
|
||||||
return printf('%s%s%s', &fenc, &l:bomb ? '[BOM]' : '', strlen(&ff) > 0 ? '['.&ff.']' : '')
|
return printf('%s%s%s', &fenc, &l:bomb ? '[BOM]' : '', strlen(&ff) > 0 ? '['.&ff.']' : '')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
Reference in new issue
Block a user