@@ -48,7 +48,13 @@ syn match ledgerPreDeclarationType /^\(account\|payee\|commodity\|tag\)/ contain
48
48
syn match ledgerPreDeclarationName / ^\S\+\s\+\z s.*/ contained
49
49
syn match ledgerPreDeclarationDirective / ^\s\+\z s\S\+ / contained
50
50
51
- syn match ledgerComment / ^;.*$/
51
+ syn match ledgerDirective
52
+ \ /^\%(alias\|assert\|bucket\|capture\|check\|define\|expr\|fixed\|include\|year\)\s/
53
+ syn match ledgerOneCharDirective / ^\% (P\| A\| Y\| N\| D\| C\)\s /
54
+
55
+ syn region ledgerBlockComment start =/ ^comment/ end =/ ^end comment/
56
+ syn region ledgerBlockTest start =/ ^test/ end =/ ^end test/
57
+ syn match ledgerComment / ^[;|*#].*$/
52
58
" comments at eol must be preceded by at least 2 spaces / 1 tab
53
59
syn region ledgerMetadata start =/ \% ( \|\t\| ^\s\+\) ;/ skip =/ ^\s\+ ;/ end =/ ^/
54
60
\ keepend contained contains= ledgerTags,ledgerValueTag,ledgerTypedTag
@@ -70,6 +76,8 @@ exe 'syn match ledgerApplyHead '.
70
76
\ ' /' .s: oe .' \%(^apply\s\+\)\@<=\S.*$/ contained'
71
77
72
78
highlight default link ledgerComment Comment
79
+ highlight default link ledgerBlockComment Comment
80
+ highlight default link ledgerBlockTest Comment
73
81
highlight default link ledgerTransactionDate Constant
74
82
highlight default link ledgerTransactionExpression Statement
75
83
highlight default link ledgerMetadata Tag
@@ -84,6 +92,8 @@ highlight default link ledgerAmount Number
84
92
highlight default link ledgerPreDeclarationType Type
85
93
highlight default link ledgerPreDeclarationName Identifier
86
94
highlight default link ledgerPreDeclarationDirective Type
95
+ highlight default link ledgerDirective Type
96
+ highlight default link ledgerOneCharDirective Type
87
97
88
98
" syncinc is easy: search for the first transaction.
89
99
syn sync clear
0 commit comments