From da457ae5ea0ef6b8a92b2a56e4ef8b6662d89081 Mon Sep 17 00:00:00 2001 From: "R.Chavignat" Date: Thu, 22 Sep 2016 14:27:07 +0200 Subject: [PATCH] Add support for b:airline_whitespace_checks variable and documentation --- autoload/airline/extensions/whitespace.vim | 2 +- doc/airline.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/whitespace.vim b/autoload/airline/extensions/whitespace.vim index 375a8902..584aa70f 100644 --- a/autoload/airline/extensions/whitespace.vim +++ b/autoload/airline/extensions/whitespace.vim @@ -57,7 +57,7 @@ function! airline#extensions#whitespace#check() if !exists('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 if index(checks, 'trailing') > -1 diff --git a/doc/airline.txt b/doc/airline.txt index 280b4c76..40434418 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -487,6 +487,9 @@ eclim " trailing: trailing whitespace " mixed-indent-file: different indentation in different lines 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. > let g:airline#extensions#whitespace#max_lines = 20000