syntastic: slightly tweak output format
also document how to use different syntastic statusline format closes #1525
This commit is contained in:
parent
83ceae726e
commit
2ec563bd57
|
@ -22,15 +22,15 @@ function! airline#extensions#syntastic#get(type)
|
||||||
let _backup = get(g:, 'syntastic_stl_format', '')
|
let _backup = get(g:, 'syntastic_stl_format', '')
|
||||||
let is_err = (a:type is# 'error')
|
let is_err = (a:type is# 'error')
|
||||||
if is_err
|
if is_err
|
||||||
let g:syntastic_stl_format = '%E{%e(L%fe)}'
|
let g:syntastic_stl_format = get(g:, 'airline#extensions#syntastic#stl_format_err', '%E{[%e(#%fe)]}')
|
||||||
else
|
else
|
||||||
let g:syntastic_stl_format = '%W{%w(L%fw)}'
|
let g:syntastic_stl_format = get(g:, 'airline#extensions#syntastic#stl_format_warn', '%W{[%w(#%fw)]}')
|
||||||
endif
|
endif
|
||||||
let cnt = SyntasticStatuslineFlag()
|
let cnt = SyntasticStatuslineFlag()
|
||||||
if !empty(_backup)
|
if !empty(_backup)
|
||||||
let g:syntastic_stl_format = _backup
|
let g:syntastic_stl_format = _backup
|
||||||
endif
|
endif
|
||||||
if cnt == 0
|
if empty(cnt)
|
||||||
return ''
|
return ''
|
||||||
else
|
else
|
||||||
return (is_err ? s:error_symbol : s:warning_symbol).cnt
|
return (is_err ? s:error_symbol : s:warning_symbol).cnt
|
||||||
|
|
|
@ -456,8 +456,14 @@ syntastic <https://github.com/vim-syntastic/syntastic>
|
||||||
* syntastic error_symbol >
|
* syntastic error_symbol >
|
||||||
let airline#extensions#syntastic#error_symbol = 'E:'
|
let airline#extensions#syntastic#error_symbol = 'E:'
|
||||||
<
|
<
|
||||||
|
* syntastic statusline error format (see |syntastic_stl_format|) >
|
||||||
|
let airline#extensions#syntastic#stl_format_err = '%E{]%e(#%fe)]}'
|
||||||
|
|
||||||
* syntastic warning >
|
* syntastic warning >
|
||||||
let airline#extensions#syntastic#warning_symbol = 'W:'
|
let airline#extensions#syntastic#warning_symbol = 'W:'
|
||||||
|
<
|
||||||
|
* syntastic statusline warning format (see |syntastic_stl_format|) >
|
||||||
|
let airline#extensions#syntastic#stl_format_err = '%W{]%w(#%fw)]}'
|
||||||
<
|
<
|
||||||
------------------------------------- *airline-tagbar*
|
------------------------------------- *airline-tagbar*
|
||||||
tagbar <https://github.com/majutsushi/tagbar>
|
tagbar <https://github.com/majutsushi/tagbar>
|
||||||
|
|
Loading…
Reference in New Issue