summaryrefslogtreecommitdiff
path: root/contrib/vim/compiler/ledger.vim
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-11-09 09:14:57 -0600
committerJohn Wiegley <johnw@newartisans.com>2010-11-09 09:14:57 -0600
commit460ad6ee76084702786d84f514d6b360a6f71374 (patch)
tree7984e8d5f83ce90b18f96b00312006ab91ae5452 /contrib/vim/compiler/ledger.vim
parent6901c3bd55d0ffa60ea9175c87223a3b11501a5b (diff)
parent64ce9e2e99423436329a2ea207c4f45bb17f8766 (diff)
downloadfork-ledger-460ad6ee76084702786d84f514d6b360a6f71374.tar.gz
fork-ledger-460ad6ee76084702786d84f514d6b360a6f71374.tar.bz2
fork-ledger-460ad6ee76084702786d84f514d6b360a6f71374.zip
Merge remote branch 'kljohann/vim' into next
Diffstat (limited to 'contrib/vim/compiler/ledger.vim')
-rw-r--r--contrib/vim/compiler/ledger.vim13
1 files changed, 5 insertions, 8 deletions
diff --git a/contrib/vim/compiler/ledger.vim b/contrib/vim/compiler/ledger.vim
index 33b019cb..e9e98a8e 100644
--- a/contrib/vim/compiler/ledger.vim
+++ b/contrib/vim/compiler/ledger.vim
@@ -12,20 +12,17 @@ if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
-if ! exists("g:ledger_bin") || ! executable(g:ledger_bin)
- if executable('ledger')
- let g:ledger_bin = 'ledger'
- else
- echoerr "ledger command not found. Set g:ledger_bin or extend $PATH."
- finish
- endif
+" default value will be set in ftplugin
+if ! exists("g:ledger_bin") || empty(g:ledger_bin) || ! executable(split(g:ledger_bin, '\s')[0])
+ finish
endif
" %-G throws away blank lines, everything else is assumed to be part of a
" multi-line error message.
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,
" 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'