Skip to content

Commit 91790fc

Browse files
author
Lifepillar
committed
Improve the error format.
Update the error format so that each error is on one line.
1 parent 97fa935 commit 91790fc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

compiler/ledger.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ if ! exists("g:ledger_bin") || empty(g:ledger_bin) || ! executable(split(g:ledge
1717
finish
1818
endif
1919

20-
" %-G throws away blank lines, everything else is assumed to be part of a
21-
" multi-line error message.
22-
CompilerSet errorformat=%-G,%EWhile\ parsing\ file\ \"%f\"\\,\ line\ %l:%.%#,%ZError:\ %m,%C%.%#
20+
" Capture Ledger errors (%-C ignores all lines between "While parsing..." and "Error:..."):
21+
CompilerSet errorformat=%EWhile\ parsing\ file\ \"%f\"\\,\ line\ %l:,%ZError:\ %m,%-C%.%#
22+
" Capture Ledger warnings:
2323
CompilerSet errorformat+=%tarning:\ \"%f\"\\,\ line\ %l:\ %m
24+
" Skip all other lines:
25+
CompilerSet errorformat+=%-G%.%#
2426

2527
" unfortunately there is no 'check file' command,
2628
" so we will just use a query that returns no results. ever.

0 commit comments

Comments
 (0)