mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-25 09:41:33 +08:00
Add the b:airline_whitespace_disabled feature.
If the per-buffer variable b:airline_whitespace_disabled is defined and non-zero, whitespace checking will be disabled for that buffer.
This commit is contained in:
parent
ba94fa12b9
commit
e67b2847ea
|
@ -51,6 +51,7 @@ endfunction
|
|||
|
||||
function! airline#extensions#whitespace#check()
|
||||
if &readonly || !&modifiable || !s:enabled || line('$') > s:max_lines
|
||||
\ || get(b:, 'airline_whitespace_disabled', 0)
|
||||
return ''
|
||||
endif
|
||||
|
||||
|
|
|
@ -502,6 +502,15 @@ eclim <https://eclim.org>
|
|||
matters for mix-indent-file algorithm: >
|
||||
let airline#extensions#c_like_langs = ['c', 'cpp', 'cuda', 'javascript', 'ld', 'php']
|
||||
<
|
||||
* disable whitespace checking for an individual buffer >
|
||||
" Checking is enabled by default because b:airline_whitespace_disabled
|
||||
" is by default not defined:
|
||||
unlet b:airline_whitespace_disabled
|
||||
|
||||
" If b:airline_whitespace_disabled is defined and is non-zero for a buffer,
|
||||
" then whitespace checking will be disabled for that buffer; for example:
|
||||
" let b:airline_whitespace_disabled = 1
|
||||
<
|
||||
------------------------------------- *airline-tabline*
|
||||
Note: If you're using the ctrlspace tabline only the option marked with (c)
|
||||
are supported!
|
||||
|
|
Loading…
Reference in New Issue
Block a user