beancount.vim (1003B)
1 if exists('b:did_ftplugin') 2 finish 3 endif 4 5 let b:did_ftplugin = 1 6 let b:undo_ftplugin = 'setlocal foldmethod< comments< commentstring< omnifunc<' 7 let b:undo_ftplugin .= '| delc -buffer AlignCommodity' 8 let b:undo_ftplugin .= '| delc -buffer GetContext' 9 10 setl foldmethod=syntax 11 setl comments=b:; 12 setl commentstring=;\ %s 13 compiler bean_check 14 15 " This variable customizes the behavior of the AlignCommodity command. 16 if !exists('g:beancount_separator_col') 17 let g:beancount_separator_col = 50 18 endif 19 if !exists('g:beancount_account_completion') 20 let g:beancount_account_completion = 'default' 21 endif 22 if !exists('g:beancount_detailed_first') 23 let g:beancount_detailed_first = 0 24 endif 25 26 command! -buffer -range AlignCommodity 27 \ :call beancount#align_commodity(<line1>, <line2>) 28 29 command! -buffer -range GetContext 30 \ :call beancount#get_context() 31 32 " Omnifunc for account completion. 33 if get(g:, 'beancount_completion_enable', 0) 34 setl omnifunc=beancountcomplete#complete 35 endif