aboutsummaryrefslogtreecommitdiffstats
path: root/syntax
diff options
context:
space:
mode:
authorNathan Grigg2016-04-24 14:43:54 -0700
committerNathan Grigg2016-04-24 14:43:54 -0700
commitcdeb7e632e62122cfdaca1d2ca993ad8be88729b (patch)
treedf7d500bfc6c68baa6ae4870c07d70a7b7376d89 /syntax
parentaad3db169d6057e11ceafa6a2dbe1ac34bbf49e4 (diff)
parentcc4f86ba5cace4aa7c705d6143af6e5152044b34 (diff)
downloadvim-beancount-cdeb7e632e62122cfdaca1d2ca993ad8be88729b.tar.gz
Merge pull request #12 from xentac/master
Add fold rules for markdown style sections
Diffstat (limited to 'syntax')
-rw-r--r--syntax/beancount.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/syntax/beancount.vim b/syntax/beancount.vim
index 4cf0704..fa7abf3 100644
--- a/syntax/beancount.vim
+++ b/syntax/beancount.vim
@@ -61,6 +61,18 @@ syn region beanMeta matchgroup=beanTag start="^\v\C\s+[-a-z]+:(\s|$)@=" end="$"
syn region beanCost start="{" end="}" contains=beanAmount contained
syn match beanPrice "\V@@\?" nextgroup=beanAmount contained
+syn region beanHashHeaderFold
+ \ start="^\z(#\+\)"
+ \ skip="^\s*\z1#\+"
+ \ end="^\(#\)\@="
+ \ fold contains=TOP
+
+syn region beanStarHeaderFold
+ \ start="^\z(\*\+\)"
+ \ skip="^\s*\z1\*\+"
+ \ end="^\(\*\)\@="
+ \ fold contains=TOP
+
highlight default link beanKeyword Keyword
highlight default link beanOptionTitle Keyword
highlight default link beanDate Keyword