From 7e143898c29b9c66fb5e1b12c2e4fe17cc782366 Mon Sep 17 00:00:00 2001 From: Nathan Grigg Date: Wed, 15 Apr 2015 09:53:02 -0700 Subject: Add a beancount compiler that calls bean-check. - Set the make program to bean-check. - Set the errorformat to parse the output of bean-check. --- compiler/beancount.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 compiler/beancount.vim (limited to 'compiler/beancount.vim') diff --git a/compiler/beancount.vim b/compiler/beancount.vim new file mode 100644 index 0000000..5bcaa15 --- /dev/null +++ b/compiler/beancount.vim @@ -0,0 +1,19 @@ +if exists("current_compiler") + finish +endif +let current_compiler = "beancount" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=bean-check\ % +CompilerSet errorformat=%-G " Skip blank lines +CompilerSet errorformat+=%f:%l:\ %m " File:line: message +CompilerSet errorformat+=%-G\ %.%# " Skip indented lines. + +let &cpo = s:cpo_save +unlet s:cpo_save -- cgit v1.2.3-2-gb3c3