diff --git a/autoload/airline/parts.vim b/autoload/airline/parts.vim index 7b9bc965..678318bf 100644 --- a/autoload/airline/parts.vim +++ b/autoload/airline/parts.vim @@ -107,11 +107,12 @@ endfunction function! airline#parts#ffenc() let expected = get(g:, 'airline#parts#ffenc#skip_expected_string', '') - let bomb = &l:bomb ? '[BOM]' : '' + let bomb = &bomb ? '[BOM]' : '' + let noeolf = &eol ? '' : '[!EOL]' let ff = strlen(&ff) ? '['.&ff.']' : '' - if expected is# &fenc.bomb.ff + if expected is# &fenc.bomb.noeolf.ff return '' else - return &fenc.bomb.ff + return &fenc.bomb.noeolf.ff endif endfunction diff --git a/doc/airline.txt b/doc/airline.txt index bd0089f2..46f6d1c8 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -68,6 +68,8 @@ section meaning (example)~ C filename + read-only flag (`~/.vim/vimrc RO`) X filetype (`vim`) Y file encoding[fileformat] (`utf-8[unix]`) + optionally may contain Byte Order Mark `[BOM]` and missing end of last + line `[!EOL]` Z current position in the file percentage % ☰ current line/number of lines ln : column So this: 10% ☰ 10/100 ln : 20 means: > @@ -403,7 +405,7 @@ window. let g:airline_section_c (bufferline or filename, readonly) let g:airline_section_gutter (csv) let g:airline_section_x (tagbar, filetype, virtualenv) - let g:airline_section_y (fileencoding, fileformat) + let g:airline_section_y (fileencoding, fileformat, 'bom', 'eol') let g:airline_section_z (percentage, line number, column number) let g:airline_section_error (ycm_error_count, syntastic-err, eclim, languageclient_error_count)