diff --git a/autoload/airline/extensions/whitespace.vim b/autoload/airline/extensions/whitespace.vim index 4e98964..861fb28 100644 --- a/autoload/airline/extensions/whitespace.vim +++ b/autoload/airline/extensions/whitespace.vim @@ -139,6 +139,12 @@ function! airline#extensions#whitespace#toggle() echo 'Whitespace checking: '.(s:enabled ? 'Enabled' : 'Disabled') endfunction +function! airline#extensions#whitespace#disable() + if s:enabled + call airline#extensions#whitespace#toggle() + endif +endfunction + function! airline#extensions#whitespace#init(...) call airline#parts#define_function('whitespace', 'airline#extensions#whitespace#check') diff --git a/doc/airline.txt b/doc/airline.txt index 2e97af1..11454e9 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -489,6 +489,10 @@ eclim * enable/disable detection of whitespace errors. > let g:airline#extensions#whitespace#enabled = 1 < +* disable detection of whitespace errors. > + " useful to call for particular file types (e.g., in "ftplugin/*") + silent! call airline#extensions#whitespace#disable +< * customize the type of mixed indent checking to perform. > " must be all spaces or all tabs before the first non-whitespace character let g:airline#extensions#whitespace#mixed_indent_algo = 0 (default)