dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit 439ad04af13bc4afc313ea6c2e6d611745b57bfd
parent 7951626728bd6dcc772bf940219921f93bcc24d6
Author: Chris Bracken <chris@bracken.jp>
Date:   Fri,  1 Oct 2021 09:13:41 -0700

Add beancount plugin

Diffstat:
M.vim/vimrc | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/.vim/vimrc b/.vim/vimrc @@ -10,6 +10,7 @@ Plugin 'spacehi.vim' " Highlight bad whitespace Plugin 'vimwiki/vimwiki' " Language support plugins. +Plugin 'nathangrigg/vim-beancount' Plugin 'cespare/vim-toml' Plugin 'dart-lang/dart-vim-plugin' Plugin 'fatih/vim-go' @@ -95,6 +96,25 @@ let g:go_highlight_operators = 1 let g:go_highlight_build_constraints = 1 let g:syntastic_go_checkers = ["go", "golint", "errcheck"] +" Configure ledger. +let g:ledger_date_format = '%Y-%m-%d' +au FileType ledger inoremap <silent> <Tab> <C-r>=ledger#autocomplete_and_align()<CR> +au FileType ledger vnoremap <silent> <Tab> :LedgerAlign<CR> + +" Configure beancount. +let g:beancount_separator_col = 60 +function! BeancountComplete() + let line = getline('.') + if matchend(line, '^\s\+') >= col('.') - 1 + return '\<C-x>\<C-o>' + endif + return '\<Tab>' +endfunction +au FileType beancount inoremap <silent> <Tab> <C-r>=BeancountComplete()<CR> +au FileType beancount inoremap . .<C-\><C-o>:AlignCommodity<CR> +au FileType beancount nnoremap <buffer> <leader>= :AlignCommodity<CR> +au FileType beancount vnoremap <buffer> <leader>= :AlignCommodity<CR> + " Configure VimWiki. let wiki_1 = {} let wiki_1.index = 'Home'