aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ftplugin/beancount.vim23
1 files changed, 3 insertions, 20 deletions
diff --git a/ftplugin/beancount.vim b/ftplugin/beancount.vim
index 277285e..159ad0f 100644
--- a/ftplugin/beancount.vim
+++ b/ftplugin/beancount.vim
@@ -18,25 +18,8 @@ if !exists("g:beancount_decimal_separator")
let g:beancount_decimal_separator = "."
endif
-command! -range AlignCommodity :call beancount#align_commodity(<line1>, <line2>)
-
-" Align commodity to proper column
-inoremap <buffer> . .<C-O>:AlignCommodity<CR>
-nnoremap <buffer> <leader>= :AlignCommodity<CR>
-vnoremap <buffer> <leader>= :AlignCommodity<CR>
-
-" Insert incoming transactions at the bottom
-function! s:InsertIncoming()
- let incoming = expand('%:h') . '/incoming.bean'
- try
- execute '$read' incoming
- call system('mv ' . incoming . ' ' . incoming . '~')
- catch /:E484/
- echom "Not found: incoming.bean"
- endtry
-endfunction
-
-command! -buffer Incoming call <SID>InsertIncoming()
-
+command! -buffer -range AlignCommodity
+ \ :call beancount#align_commodity(<line1>, <line2>)
+" Omnifunc for account completion.
setl omnifunc=beancount#complete_account