mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-16 00:37:08 +08:00
Add a function to disable whitespace-detection
Useful to call for particular file types (e.g., .tex files):
ftplugin/tex.vim:
call airline#extensions#whitespace#disable()
This commit is contained in:
committed by
Christian Brabandt
parent
7e6986651c
commit
3c6135d75f
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user