folds: Preserve folding of the taskwiki files

This commit is contained in:
Tomas Babej 2015-09-18 07:07:50 +02:00
parent fe0c91925f
commit 34c4119c64

View file

@ -26,10 +26,13 @@ endif
" Execute the main body of taskwiki source
execute 'pyfile ' . s:plugin_path . '/taskwiki/taskwiki.py'
" Update to TW upon saving
augroup taskwiki
autocmd!
" Update to TW upon saving
execute "autocmd BufWrite *.".expand('%:e')." TaskWikiBufferSave"
" Save and load the view to preserve folding
execute "autocmd BufWinLeave *.".expand('%:e')." mkview"
execute "autocmd BufWinEnter *.".expand('%:e')." silent loadview"
augroup END
" Global update commands