aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorKonstantin Mikhailov2016-10-01 07:16:18 +0000
committerKonstantin Mikhailov2016-10-01 07:16:18 +0000
commit383bfad33a38a82a7fa6b5dfdf51fee11fa443bc (patch)
treeded9e532a8731319d015b18044561ca4c28a044b /autoload
parentca19083bf5ac0f34f96509e7e62349550faa5535 (diff)
downloadvim-beancount-383bfad33a38a82a7fa6b5dfdf51fee11fa443bc.tar.gz
Fix AlignCommodity to work with balance and price
Closes #21 and #24. Supports dates with slash separator.
Diffstat (limited to '')
-rw-r--r--autoload/beancount.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/beancount.vim b/autoload/beancount.vim
index e7e4901..230ecba 100644
--- a/autoload/beancount.vim
+++ b/autoload/beancount.vim
@@ -21,7 +21,7 @@ function! beancount#align_commodity(line1, line2)
" This matches an account name followed by a space. There may be
" some conflicts with non-transaction syntax that I don't know about.
" It won't match a comment or any non-indented line.
- let end_acc = matchend(s, '^\v([-\d]+\s+(balance|price))? +\S+[^:] ')
+ let end_acc = matchend(s, '^\v([\-/[:digit:]]+\s+(balance|price))? +\S+[^:] ')
if end_acc < 0 | continue | endif
" Where does commodity amount begin?
let end_space = matchend(s, '^ *', end_acc)