Skip to content

Fix report highlighting #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions autoload/ledger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@ function! ledger#output(report)
nnoremap <silent> <buffer> <tab> <c-w><c-p>
nnoremap <silent> <buffer> q <c-w><c-p>@=winnr("#")<cr><c-w>c
" Add some coloring to the report
syntax match LedgerNumber /-\@1<!\d\+\([,.]\d\+\)\+/
syntax match LedgerNegativeNumber /-\d\+\([,.]\d\+\)\+/
syntax match LedgerNumber /-\@1<!\d\+\([,.]\d\+\)*/
syntax match LedgerNegativeNumber /-\d\+\([,.]\d\+\)*/
syntax match LedgerImproperPerc /\d\d\d\+%/
return 1
endf
Expand Down
12 changes: 6 additions & 6 deletions ftplugin/ledger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ endif
" }}}

" Highlight groups for Ledger reports {{{
hi! link LedgerNumber Number
hi! link LedgerNegativeNumber Special
hi! link LedgerCleared Constant
hi! link LedgerPending Todo
hi! link LedgerTarget Statement
hi! link LedgerImproperPerc Special
hi link LedgerNumber Number
hi link LedgerNegativeNumber Special
hi link LedgerCleared Constant
hi link LedgerPending Todo
hi link LedgerTarget Statement
hi link LedgerImproperPerc Special
" }}}

let s:rx_amount = '\('.
Expand Down