aboutsummaryrefslogtreecommitdiffstats
path: root/syntax
diff options
context:
space:
mode:
authorNathan Grigg2014-11-03 08:18:05 -0800
committerNathan Grigg2014-11-03 08:18:12 -0800
commit811be4ffbfbb7f0a11b71455b3ad52bd6e32bd7d (patch)
tree04e9b8e4a719d28738325db684dea860c5d9f5f4 /syntax
parent76fafa39b7c7371562dcf61e2d489c449cd3bca1 (diff)
downloadvim-beancount-811be4ffbfbb7f0a11b71455b3ad52bd6e32bd7d.tar.gz
Move price syntax to its own definition
Diffstat (limited to '')
-rw-r--r--syntax/beancount.vim6
1 files changed, 4 insertions, 2 deletions
diff --git a/syntax/beancount.vim b/syntax/beancount.vim
index 8d8bda5..2fe4be9 100644
--- a/syntax/beancount.vim
+++ b/syntax/beancount.vim
@@ -21,7 +21,7 @@ syn match beanAccount "\v[[:alnum:]]+:[[:alnum:]:]+" contained
" Most directives start with a date.
syn match beanDate "^\v\d{4}-\d{2}-\d{2}" skipwhite
- \ nextgroup=beanOpen,beanTxn,beanClose,beanNote,beanBalance,beanEvent,beanPad
+ \ nextgroup=beanOpen,beanTxn,beanClose,beanNote,beanBalance,beanEvent,beanPad,beanPrice
" Options and events have two string arguments. The first, we are matching as
" beanOptionTitle and the second as a regular string.
syn region beanOption matchgroup=beanKeyword start="^option" end="$"
@@ -36,8 +36,10 @@ syn region beanClose matchgroup=beanKeyword start="close" end="$"
\ contains=beanAccount,beanComment
syn region beanNote matchgroup=beanKeyword start="\vnote|document" end="$"
\ contains=beanAccount,beanString,beanComment
-syn region beanBalance matchgroup=beanKeyword start="balance\|price" end="$"
+syn region beanBalance matchgroup=beanKeyword start="balance" end="$"
\ contains=beanAccount,beanAmount,beanComment
+syn region beanPrice matchgroup=beanKeyword start="price" end="$"
+ \ contains=beanCurrency,beanAmount
syn keyword beanKeyword pushtag poptag
syn region beanPad matchgroup=beanKeyword start="^pad" end="$"
\ contains=beanAccount,beanComment