aboutsummaryrefslogtreecommitdiffstats
path: root/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin')
-rw-r--r--ftplugin/beancount.vim13
1 files 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 <SID>InsertIncoming()
-
-setl commentstring=;%s