From cc4f86ba5cace4aa7c705d6143af6e5152044b34 Mon Sep 17 00:00:00 2001 From: Jason Chu Date: Mon, 1 Feb 2016 20:51:02 -0800 Subject: Add fold rules for markdown style sections --- syntax/beancount.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- cgit v1.2.3-2-gb3c3