2a31984369
taskwiki integrates vimwiki with taskwarrior, and in doing so changes
the semantics of checkboxes a bit:
* [ ] Install Taskwiki | pending task
* [X] Install Taskwiki | completed task
* [D] Install Taskwiki | deleted task
* [S] Install Taskwiki | started task
* [W] Install Taskwiki | waiting task
It's still desirable for vimwiki to automatically insert `* [ ]` on
`i_<CR>`, `o` and `O` and to syntax highlight all these five as
checkboxes, so I have this in my .vimrc:
let g:vimwiki_listsym_rejected = 'D'
let g:vimwiki_listsyms = ' WSX'
but it results in undesirable behaviour with task hierarchies: when I
add a new subtask (using `i_<CR>`, `o` or `O`)
or mark a subtask done, the parent's checkbox is updated to reflect its
overall completion, to one of ` `, `W`, `S` or `X`, depending on
subtasks completion. This makes little sense in taskwiki. One usually
doesn't want to touch the "parent" task in taskwarrior until the
"subtasks" are done. Setting
let g:vimwiki_listsym_rejected = 'W'
let g:vimwiki_listsyms = ' SX'
results in slightly less illogical behaviour, but it still assumes that
(1) all subtasks are visible (not necessarily true in taskwiki) and
(2) that it's a parent/subtask relationship, not a dependency
relationship (not true in taskwarrior, questionable in taskwiki).
This commit adds an option to disable this behaviour.
88 lines
1.4 KiB
Plaintext
88 lines
1.4 KiB
Plaintext
# Task list update, propagation disabled
|
|
|
|
Given vimwiki (Sample nested list, vimwiki syntax):
|
|
* [ ] Top Level
|
|
* [ ] Child 1
|
|
* [ ] Child 2
|
|
* [ ] Child 3
|
|
|
|
Execute (Set syntax to default):
|
|
set sw=2
|
|
call SetSyntax('default')
|
|
call vimwiki#vars#set_wikilocal('listsyms_propagate', 0)
|
|
|
|
Do (Toggle top-level):
|
|
\<C-Space>
|
|
|
|
Expect vimwiki (Only top updated):
|
|
* [X] Top Level
|
|
* [ ] Child 1
|
|
* [ ] Child 2
|
|
* [ ] Child 3
|
|
|
|
Do (Toggle child 1):
|
|
j
|
|
\<C-Space>
|
|
|
|
Expect vimwiki (Only child 1 updated):
|
|
* [ ] Top Level
|
|
* [X] Child 1
|
|
* [ ] Child 2
|
|
* [ ] Child 3
|
|
|
|
Do (Toggle all children):
|
|
j
|
|
\<C-Space>
|
|
j
|
|
\<C-Space>
|
|
j
|
|
\<C-Space>
|
|
|
|
Expect vimwiki (Only children updated):
|
|
* [ ] Top Level
|
|
* [X] Child 1
|
|
* [X] Child 2
|
|
* [X] Child 3
|
|
|
|
Given vimwiki (Deeply nested list, vimwiki syntax):
|
|
* [ ] Top Level
|
|
* [ ] Child 1
|
|
* [X] Child 2
|
|
|
|
Do (Indent child 2):
|
|
jj
|
|
a\<C-D>
|
|
|
|
Expect vimwiki (Child 2 indent changed, checkmarks unchanged):
|
|
* [ ] Top Level
|
|
* [ ] Child 1
|
|
* [X] Child 2
|
|
|
|
Do (Add child 3):
|
|
jj
|
|
o
|
|
Child 3
|
|
|
|
Expect vimwiki (Child 3 added, checkmarks unchanged):
|
|
* [ ] Top Level
|
|
* [ ] Child 1
|
|
* [X] Child 2
|
|
* [ ] Child 3
|
|
|
|
Do (Add and indent child 3):
|
|
jj
|
|
o
|
|
\<C-T>
|
|
Child 3
|
|
|
|
Expect vimwiki (Child 3 added, checkmarks unchanged):
|
|
* [ ] Top Level
|
|
* [ ] Child 1
|
|
* [X] Child 2
|
|
* [ ] Child 3
|
|
|
|
Execute (Clean):
|
|
set sw&
|
|
|
|
# vim: sw=2:foldlevel=30:foldmethod=indent:
|