aboutsummaryrefslogtreecommitdiff
path: root/.vim/after/plugin/ledger.vim
blob: 77f5f3a246339c450020cbd47120b6832820cf45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
let g:ledger_bin = 'ledger'
let g:ledger_align_at = 50
let g:ledger_commodity_before = 0
let g:ledger_align_commodity = 1
let g:ledger_extra_options = '--pedantic --explicit --check-payees'

function! s:ledger_keymap() abort
    noremap { ?^\d<CR>
    noremap } /^\d<CR>
    inoremap <silent> <Tab> <C-r>=ledger#autocomplete_and_align()<CR>
    vnoremap <silent> <Tab> :LedgerAlign<CR>
endfunction

au FileType ledger call s:ledger_keymap()