aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2023-10-13 04:37:34 +0800
committerGuangxiong Lin <[email protected]>2023-10-13 04:37:34 +0800
commitacad3afbb2fc28a7db62a41045ead6dbf31d45b2 (patch)
treebe1abb53ed27b4bb54931f077e27efe14a577d01
parent22455a984d84eb8d6dec1255ad628c631e36303f (diff)
downloaddotfiles-acad3afbb2fc28a7db62a41045ead6dbf31d45b2.tar.gz
dotfiles-acad3afbb2fc28a7db62a41045ead6dbf31d45b2.tar.bz2
dotfiles-acad3afbb2fc28a7db62a41045ead6dbf31d45b2.zip
Tab may be more useful to formatting
-rw-r--r--.vim/after/plugin/ledger.vim4
1 files changed, 1 insertions, 3 deletions
diff --git a/.vim/after/plugin/ledger.vim b/.vim/after/plugin/ledger.vim
index feaae92..b041ec0 100644
--- a/.vim/after/plugin/ledger.vim
+++ b/.vim/after/plugin/ledger.vim
@@ -27,13 +27,11 @@ function! HLedgerEntry() abort
endfunction
function! s:ledger_keymap() abort
- " formatprg is used in vim-ledger. Thus equalprg is used here.
- let &l:equalprg = 'hledger -f- print'
-
noremap { ?^\d<CR>
noremap } /^\d<CR>
noremap <silent> <buffer> * :call ledger#transaction_state_toggle(line('.'), ' *!')<CR>
+ nnoremap <silent> <buffer> <Tab> vip!hledger -f- print<CR>
inoremap <silent> <buffer> <c-x><c-x> <c-o>:call HLedgerEntry()<CR>
endfunction