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.
304
304
305
305
let g:ledger_commodity_sep = ''
306
306
307
+ * Flag that enable the spelling of the amount:
308
+
309
+ let g:ledger_commodity_spell = 1
310
+
307
311
* Format of transaction date:
308
312
309
313
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
21
21
let s: skip .= ' \n\@!'
22
22
endif
23
23
24
+ let s: ledgerAmount_contains = ' '
25
+ if get (g: , ' ledger_commodity_spell' , 0 ) == 0
26
+ let s: ledgerAmount_contains .= ' @NoSpell'
27
+ endif
28
+
24
29
" for debugging
25
30
syntax clear
26
31
@@ -39,7 +44,7 @@ syn match ledgerPosting /^\s\+[^[:blank:];][^;]*\ze\%($\|;\)/
39
44
exe ' syn match ledgerAccount ' .
40
45
\ ' /' .s: oe .' ^\s\+\zs\%(\S' .s: lb1 .' \S\|\S\)\+\ze\%( \|\t\|\s*$\)/ contained'
41
46
exe ' 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'
43
48
44
49
syn region ledgerPreDeclaration start =/ ^\( account\| payee\| commodity\| tag\) / skip =/ ^\s / end =/ ^/
45
50
\ keepend transparent
You can’t perform that action at this time.
0 commit comments