mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-01-19 10:42:46 +08:00
Disable whitespace checking for csv files
In addition, add a time limit of 500 ms for detecting the indent fixes: #2200
This commit is contained in:
parent
16935cc666
commit
21e47ca5b3
|
@ -10,7 +10,8 @@ let s:symbol = get(g:, 'airline#extensions#whitespace#symbol', g:airline_symbols
|
|||
let s:default_checks = ['indent', 'trailing', 'mixed-indent-file', 'conflicts']
|
||||
|
||||
let s:enabled = get(g:, 'airline#extensions#whitespace#enabled', 1)
|
||||
let s:skip_check_ft = {'make': ['indent', 'mixed-indent-file']}
|
||||
let s:skip_check_ft = {'make': ['indent', 'mixed-indent-file'],
|
||||
\ 'csv': ['indent', 'mixed-indent-file']}
|
||||
|
||||
function! s:check_mixed_indent()
|
||||
let indent_algo = get(g:, 'airline#extensions#whitespace#mixed_indent_algo', 0)
|
||||
|
@ -23,9 +24,9 @@ function! s:check_mixed_indent()
|
|||
let t_l_s = '(^\t+ {' . &ts . ',}' . '\S)'
|
||||
return search('\v' . t_s_t . '|' . t_l_s, 'nw')
|
||||
elseif indent_algo == 2
|
||||
return search('\v(^\t* +\t\s*\S)', 'nw')
|
||||
return search('\v(^\t* +\t\s*\S)', 'nw', 0, 500)
|
||||
else
|
||||
return search('\v(^\t+ +)|(^ +\t+)', 'nw')
|
||||
return search('\v(^\t+ +)|(^ +\t+)', 'nw', 0, 500)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user