mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-23 20:36:40 +02:00
Added option to disable fold saving
This commit is contained in:
parent
65cd3d95c0
commit
64a6852eac
2 changed files with 9 additions and 3 deletions
|
@ -663,6 +663,10 @@ constructs.
|
||||||
use the same colors for task highlighting as those defined in
|
use the same colors for task highlighting as those defined in
|
||||||
taskwarrior.
|
taskwarrior.
|
||||||
|
|
||||||
|
*taskwiki_dont_preserve_folds*
|
||||||
|
If set to a non-empty value (such as "yes"), taskwiki will not
|
||||||
|
preserve folding when entering or leaving a vimwiki buffer.
|
||||||
|
|
||||||
*taskwiki_disable*
|
*taskwiki_disable*
|
||||||
Setting any non-empty value for this variable will disable taskwiki.
|
Setting any non-empty value for this variable will disable taskwiki.
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,11 @@ augroup taskwiki
|
||||||
autocmd!
|
autocmd!
|
||||||
" Update to TW upon saving
|
" Update to TW upon saving
|
||||||
execute "autocmd BufWrite *.".expand('%:e')." TaskWikiBufferSave"
|
execute "autocmd BufWrite *.".expand('%:e')." TaskWikiBufferSave"
|
||||||
" Save and load the view to preserve folding
|
" Save and load the view to preserve folding, if desired
|
||||||
|
if !exists('g:taskwiki_dont_preserve_folds')
|
||||||
execute "autocmd BufWinLeave *.".expand('%:e')." mkview"
|
execute "autocmd BufWinLeave *.".expand('%:e')." mkview"
|
||||||
execute "autocmd BufWinEnter *.".expand('%:e')." silent loadview"
|
execute "autocmd BufWinEnter *.".expand('%:e')." silent loadview"
|
||||||
|
endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" Global update commands
|
" Global update commands
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue