Skip to content

Commit

Permalink
syntax: support multiline comment blocks
Browse files Browse the repository at this point in the history
Signed-off-by: Roland Hieber <rohieb@rohieb.name>
  • Loading branch information
rohieb committed Oct 25, 2017
1 parent 89516d2 commit dbbfbc1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions syntax/ledger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ syn match ledgerDirective
\ /^\%(alias\|assert\|bucket\|capture\|check\|define\|expr\|fixed\|include\|year\)\s/
syn match ledgerOneCharDirective /^\%(P\|A\|Y\|N\|D\|C\)\s/

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

highlight default link ledgerComment Comment
highlight default link ledgerBlockComment Comment
highlight default link ledgerBlockTest Comment
highlight default link ledgerTransactionDate Constant
highlight default link ledgerTransactionExpression Statement
highlight default link ledgerMetadata Tag
Expand Down

0 comments on commit dbbfbc1

Please sign in to comment.