From fdd29caef43e67812297b03d55b0d4da38bf94b1 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sun, 3 Jul 2016 21:32:33 +0200 Subject: [PATCH] shorten filetype for smaller screens --- autoload/airline/parts.vim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/autoload/airline/parts.vim b/autoload/airline/parts.vim index 0c1fd66..c5ab94a 100644 --- a/autoload/airline/parts.vim +++ b/autoload/airline/parts.vim @@ -82,10 +82,9 @@ function! airline#parts#readonly() endfunction function! airline#parts#filetype() - return &filetype + return winwidth(0) < 100 && strlen(&filetype) > 3 ? matchstr(&filetype, '...'). '…' : &filetype endfunction function! airline#parts#ffenc() return printf('%s%s%s', &fenc, &l:bomb ? '[BOM]' : '', strlen(&ff) > 0 ? '['.&ff.']' : '') endfunction -