File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,10 @@ behaviour of the ledger filetype.
304304
305305 let g:ledger_commodity_sep = ''
306306
307+ * Flag that enable the spelling of the amount:
308+
309+ let g:ledger_commodity_spell = 1
310+
307311* Format of transaction date:
308312
309313 let g:ledger_date_format = '%Y/%m/%d'
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ if s:fb == 1
2121 let s: skip .= ' \n\@!'
2222endif
2323
24+ let s: ledgerAmount_contains = ' '
25+ if get (g: , ' ledger_commodity_spell' , 0 ) == 0
26+ let s: ledgerAmount_contains .= ' @NoSpell'
27+ endif
28+
2429" for debugging
2530syntax clear
2631
@@ -39,7 +44,7 @@ syn match ledgerPosting /^\s\+[^[:blank:];][^;]*\ze\%($\|;\)/
3944exe ' syn match ledgerAccount ' .
4045 \ ' /' .s: oe .' ^\s\+\zs\%(\S' .s: lb1 .' \S\|\S\)\+\ze\%( \|\t\|\s*$\)/ contained'
4146exe ' syn match ledgerAmount ' .
42- \ ' /' .s: oe .' \S' .s: lb1 .' \%( \|\t\)\s*\zs\%([^;[:space:]]\|\s\+[^;[:space:]]\)\+/ contained'
47+ \ ' /' .s: oe .' \S' .s: lb1 .' \%( \|\t\)\s*\zs\%([^;[:space:]]\|\s\+[^;[:space:]]\)\+/ contains= ' . s: ledgerAmount_contains . ' contained'
4348
4449syn region ledgerPreDeclaration start =/ ^\( account\| payee\| commodity\| tag\) / skip =/ ^\s / end =/ ^/
4550 \ keepend transparent
You can’t perform that action at this time.
0 commit comments