aboutsummaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
authorNathan Grigg2015-04-15 09:53:02 -0700
committerNathan Grigg2015-04-15 09:53:02 -0700
commit7e143898c29b9c66fb5e1b12c2e4fe17cc782366 (patch)
treeb1bcd0d48b3232ad95bad8a8ca20ead065fc971c /compiler
parent844101f686ef241e6835c85d78301da4cfb3f6db (diff)
downloadvim-beancount-7e143898c29b9c66fb5e1b12c2e4fe17cc782366.tar.gz
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.
Diffstat (limited to '')
-rw-r--r--compiler/beancount.vim19
1 files changed, 19 insertions, 0 deletions
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 <args>
+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