vim. display warning messages in quickfix window
To use this option you must set g:ledger_bin = "ledger --strict" before the compiler plugin is loaded (your .vimrc for example).
This commit is contained in:
parent
eda6cbd014
commit
0570c9c416
1 changed files with 3 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ if exists(":CompilerSet") != 2
|
||||||
command -nargs=* CompilerSet setlocal <args>
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ! exists("g:ledger_bin") || ! executable(g:ledger_bin)
|
if ! exists("g:ledger_bin") || empty(g:ledger_bin) || ! executable(split(g:ledger_bin, '\s')[0])
|
||||||
if executable('ledger')
|
if executable('ledger')
|
||||||
let g:ledger_bin = 'ledger'
|
let g:ledger_bin = 'ledger'
|
||||||
else
|
else
|
||||||
|
|
@ -24,8 +24,9 @@ endif
|
||||||
" %-G throws away blank lines, everything else is assumed to be part of a
|
" %-G throws away blank lines, everything else is assumed to be part of a
|
||||||
" multi-line error message.
|
" multi-line error message.
|
||||||
CompilerSet errorformat=%-G,%EWhile\ parsing\ file\ \"%f\"\\,\ line\ %l:%.%#,%ZError:\ %m,%C%.%#
|
CompilerSet errorformat=%-G,%EWhile\ parsing\ file\ \"%f\"\\,\ line\ %l:%.%#,%ZError:\ %m,%C%.%#
|
||||||
|
CompilerSet errorformat+=%tarning:\ \"%f\"\\,\ line\ %l:\ %m
|
||||||
|
|
||||||
" unfortunately there is no 'check file' command,
|
" unfortunately there is no 'check file' command,
|
||||||
" so we will just use a query that returns no results. ever.
|
" so we will just use a query that returns no results. ever.
|
||||||
exe 'CompilerSet makeprg='.g:ledger_bin.'\ -f\ %\ reg\ not\ ''.*''\ \>\ /dev/null'
|
exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ %\ reg\ not\ ''.*''\ \>\ /dev/null'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue