aboutsummaryrefslogtreecommitdiff
path: root/.vim/after/plugin/ledger.vim
blob: 71fa5b1857539022969c1394921825e4daf563a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
let g:ledger_bin = 'ledger'
let g:ledger_align_at = 50
let g:ledger_maxwidth = 80
let g:ledger_commodity_before = 0
let g:ledger_align_commodity = 1
let g:ledger_align_last = v:true
let g:ledger_decimal_sep = '.'
let g:ledger_commodity_sep = ' '
let g:ledger_date_format = '%Y-%m-%d'
let g:ledger_extra_options = ''
let g:ledger_main = expand('$HOME/ledgers/main.journal')

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()