Add support for b:airline_whitespace_checks variable and documentation

This commit is contained in:
R.Chavignat 2016-09-22 14:27:07 +02:00
parent 7a720bbbd7
commit da457ae5ea
2 changed files with 4 additions and 1 deletions

View File

@ -57,7 +57,7 @@ function! airline#extensions#whitespace#check()
if !exists('b:airline_whitespace_check') if !exists('b:airline_whitespace_check')
let b:airline_whitespace_check = '' let b:airline_whitespace_check = ''
let checks = get(g:, 'airline#extensions#whitespace#checks', s:default_checks) let checks = get(b:, 'airline_whitespace_checks', get(g:, 'airline#extensions#whitespace#checks', s:default_checks))
let trailing = 0 let trailing = 0
if index(checks, 'trailing') > -1 if index(checks, 'trailing') > -1

View File

@ -487,6 +487,9 @@ eclim <https://eclim.org>
" trailing: trailing whitespace " trailing: trailing whitespace
" mixed-indent-file: different indentation in different lines " mixed-indent-file: different indentation in different lines
let g:airline#extensions#whitespace#checks = [ 'indent', 'trailing', 'long', 'mixed-indent-file' ] let g:airline#extensions#whitespace#checks = [ 'indent', 'trailing', 'long', 'mixed-indent-file' ]
" this can also be configured for an individual buffer
let b:airline_whitespace_checks = [ 'indent', 'trailing', 'long', 'mixed-indent-file' ]
< <
* configure the maximum number of lines where whitespace checking is enabled. > * configure the maximum number of lines where whitespace checking is enabled. >
let g:airline#extensions#whitespace#max_lines = 20000 let g:airline#extensions#whitespace#max_lines = 20000