Skip to content

Commit dbbfbc1

Browse files
committed
syntax: support multiline comment blocks
Signed-off-by: Roland Hieber <[email protected]>
1 parent 89516d2 commit dbbfbc1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

syntax/ledger.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ syn match ledgerDirective
5252
\ /^\%(alias\|assert\|bucket\|capture\|check\|define\|expr\|fixed\|include\|year\)\s/
5353
syn match ledgerOneCharDirective /^\%(P\|A\|Y\|N\|D\|C\)\s/
5454

55+
syn region ledgerBlockComment start=/^comment/ end=/^end comment/
56+
syn region ledgerBlockTest start=/^test/ end=/^end test/
5557
syn match ledgerComment /^;.*$/
5658
" comments at eol must be preceded by at least 2 spaces / 1 tab
5759
syn region ledgerMetadata start=/\%( \|\t\|^\s\+\);/ skip=/^\s\+;/ end=/^/
@@ -74,6 +76,8 @@ exe 'syn match ledgerApplyHead '.
7476
\ '/'.s:oe.'\%(^apply\s\+\)\@<=\S.*$/ contained'
7577

7678
highlight default link ledgerComment Comment
79+
highlight default link ledgerBlockComment Comment
80+
highlight default link ledgerBlockTest Comment
7781
highlight default link ledgerTransactionDate Constant
7882
highlight default link ledgerTransactionExpression Statement
7983
highlight default link ledgerMetadata Tag

0 commit comments

Comments
 (0)