Functions to remove all todo items that are done (#906)

Add function VimwikiRemoveDone that will delete lines with todo list items marked as done. Works on ranges as well as without range on the current list.

Co-authored-by: Tinmarino <tinmarino@gmail.com>
This commit is contained in:
Michael F. Schönitzer
2020-06-08 14:31:35 +02:00
committed by GitHub
parent 61093f4f2a
commit a9f21c6d4a
4 changed files with 329 additions and 0 deletions

View File

@ -799,6 +799,18 @@ Vimwiki file.
*:VimwikiRenameFile*
Rename the wiki page you are in.
*:VimwikiRemoveDone*
With range: Remove all lines that have a checked |vimwiki-todo-lists| checkbox
Otherwise:
Remove all lines in the current todo-list that have a checked box. This is
applied to the list in which the cursor is in, as well as all its sublists.
The status of parents is updated accordingly.
If you want to remove only items of the current nesting level, (re)define
a command that calls the same function with `0` as first argument: >
:command! -buffer -range VimwikiRemoveDone call
\ vimwiki#lst#remove_done(0, "<range>", <line1>, <line2>)
<
*:VimwikiNextTask*
Jump to the next unfinished task in the current wiki page.