mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-20 01:03:06 +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
|
||||
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*
|
||||
Setting any non-empty value for this variable will disable taskwiki.
|
||||
|
||||
|
|
|
@ -30,9 +30,11 @@ 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"
|
||||
" 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 BufWinEnter *.".expand('%:e')." silent loadview"
|
||||
endif
|
||||
augroup END
|
||||
|
||||
" Global update commands
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue