We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e3355c commit 58561edCopy full SHA for 58561ed
ftplugin/ledger.vim
@@ -215,13 +215,18 @@ hi link LedgerTarget Statement
215
hi link LedgerImproperPerc Special
216
" }}}
217
218
-let s:rx_amount = '\('.
219
- \ '\%([0-9]\+\)'.
220
- \ '\%([,.][0-9]\+\)*'.
221
- \ '\|'.
222
- \ '[,.][0-9]\+'.
223
- \ '\)'.
224
- \ '\s*\%([[:alpha:]¢$€£]\+\s*\)\?'.
+let s:cursym = '[[:alpha:]¢$€£]\+'
+let s:valreg = '\('.
+ \ '\%([0-9]\+\)'.
+ \ '\%([,.][0-9]\+\)*'.
+ \ '\|'.
+ \ '[,.][0-9]\+'.
+ \ '\)'
225
+let s:optional_balance_assertion = '\(\s*=\s*'.s:cursym.'\s*'.s:valreg.'\)\?'
226
+
227
+let s:rx_amount = s:valreg.
228
+ \ s:optional_balance_assertion.
229
+ \ '\s*\%('.s:cursym.'\s*\)\?'.
230
\ '\%(\s*;.*\)\?$'
231
232
function! LedgerFoldText() "{{{1
0 commit comments