mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 09:58:29 +08:00
init: section_y includes missing endofline and BOM
This commit is contained in:
parent
5601c0928e
commit
8a60582527
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user