From 11890af357cbe2facfe88f50914d66b749f17efc Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 15 Jul 2020 02:10:46 +0200 Subject: [PATCH] [ADD][VIM] Beancount filetype configuration --- vim/.vim/after/ftplugin/beancount.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 vim/.vim/after/ftplugin/beancount.vim diff --git a/vim/.vim/after/ftplugin/beancount.vim b/vim/.vim/after/ftplugin/beancount.vim new file mode 100644 index 0000000..c5645c8 --- /dev/null +++ b/vim/.vim/after/ftplugin/beancount.vim @@ -0,0 +1,13 @@ +" Create the `b:undo_ftplugin` variable if it doesn't exist +call ftplugined#check_undo_ft() + +" Use a small indentation value on beancount files +setlocal shiftwidth=2 +let b:undo_ftplugin.='|setlocal shiftwidth<' + +" Have automatic padding of transactions so that decimal is on 52nd column +let g:beancount_separator_col=52 + +" Automatic padding for transactions +nnoremap = :AlignCommodity +vnoremap = :AlignCommodity