mirror of
https://github.com/vim-airline/vim-airline-themes
synced 2024-12-13 17:44:45 +00:00
Merge pull request #947 from chrisbra/custom_trailing_space
Allow to customize the trailing whitespace regexp
This commit is contained in:
commit
1be1ed8810
@ -49,7 +49,14 @@ function! airline#extensions#whitespace#check()
|
||||
|
||||
let trailing = 0
|
||||
if index(checks, 'trailing') > -1
|
||||
let trailing = search('\s$', 'nw')
|
||||
try
|
||||
let regexp = get(g:, 'airline#extensions#whitespace#trailing_regexp', '\s$')
|
||||
let trailing = search(regexp, 'nw')
|
||||
catch
|
||||
echomsg 'airline#whitespace: error occured evaluating '. regexp
|
||||
echomsg v:exception
|
||||
return ''
|
||||
endtry
|
||||
endif
|
||||
|
||||
let mixed = 0
|
||||
|
@ -449,6 +449,9 @@ eclim <https://eclim.org>
|
||||
let g:airline#extensions#whitespace#trailing_format = 'trailing[%s]'
|
||||
let g:airline#extensions#whitespace#mixed_indent_format = 'mixed-indent[%s]'
|
||||
let g:airline#extensions#whitespace#long_format = 'long[%s]'
|
||||
|
||||
* configure custom trailing whitespace regexp rule >
|
||||
let g:airline#extensions#whitespace#trailing_regexp = '\s$'
|
||||
<
|
||||
------------------------------------- *airline-tabline*
|
||||
* enable/disable enhanced tabline. >
|
||||
|
Loading…
Reference in New Issue
Block a user