mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 14:49:06 +08:00
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 is_err = (a:type is# 'error')
|
||||
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
|
||||
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
|
||||
let cnt = SyntasticStatuslineFlag()
|
||||
if !empty(_backup)
|
||||
let g:syntastic_stl_format = _backup
|
||||
endif
|
||||
if cnt == 0
|
||||
if empty(cnt)
|
||||
return ''
|
||||
else
|
||||
return (is_err ? s:error_symbol : s:warning_symbol).cnt
|
||||
|
|
|
@ -456,9 +456,15 @@ syntastic <https://github.com/vim-syntastic/syntastic>
|
|||
* syntastic error_symbol >
|
||||
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 >
|
||||
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*
|
||||
tagbar <https://github.com/majutsushi/tagbar>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user