From 76fafa39b7c7371562dcf61e2d489c449cd3bca1 Mon Sep 17 00:00:00 2001 From: Nathan Grigg Date: Sun, 2 Nov 2014 13:58:36 -0800 Subject: Add foldmethod --- ftplugin/beancount.vim | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ftplugin/beancount.vim b/ftplugin/beancount.vim index eca6dd2..4cf4bf8 100644 --- a/ftplugin/beancount.vim +++ b/ftplugin/beancount.vim @@ -1,5 +1,16 @@ " These two variables customize the behavior of the AlignCommodity command. +if exists("b:did_ftplugin") + finish +endif + +let b:did_ftplugin = 1 +let b:undo_ftplugin = "setlocal foldmethod< comments< commentstring<" + +setl foldmethod=marker +setl comments=b:; +setl commentstring=;%s + if !exists("g:beancount_separator_col") let g:beancount_separator_col = 50 endif @@ -26,5 +37,3 @@ function! s:InsertIncoming() endfunction command! -buffer Incoming call InsertIncoming() - -setl commentstring=;%s -- cgit v1.2.3-2-gb3c3