aboutsummaryrefslogtreecommitdiff
path: root/.vim/plugins/ledger.plug
blob: b3a1e25ae175671fcf3a49e96f9dc03889692796 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Plug 'ledger/vim-ledger', {'for': 'ledger'}

let g:ledger_bin = 'ledger'
let g:ledger_align_at = 50
let g:ledger_commodity_before = 0

au FileType ledger call s:ledger_keymap()

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