-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Functions to remove all todo items that are done #906
Conversation
Additionally clean up the code for more reuseability
The documentation still has to be improved. I wasn't sure if we should define both commands and whether default should be recursive or not. Recursive has the somewhat surprising but correct side effect that the status of items can decrease. See the test for example. @tinmarino @rane-brown any thoughts? |
I would put recursive as default: to get most work done which is harder to do by hand. Very readble tests, really awesome.
|
It probably doesn't belong in this PR, but what about multi-line TODO entries? I often use |
From user perspective there is no reason why this should be two commands. Since the "<range>" keyword is only available for newer versions of vim for older versions there is no way to distinguish between no range being used and an inline range. This edge case is however not relevant since the function works line based anyway.
Good argument, I changed it to recursive and updated the tests accordingly.
I actually found out about this behavior by your
Yes, better create a ticket for that (if it doesn't exist yet). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect for me but I let you merge as you got this power
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>
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 adds functions that remove todo items that are marked as done.
VimwikiRemoveDone
/vimwiki#lst#remove_done
removes them within the selected area.VimwikiRemoveDoneInList
/vimwiki#lst#remove_done_in_list
removes them in the list the cursor is in.vimwiki#lst#remove_done_in_list
has a parameter to define if it should work recursively. Default is not recursive.Superseeding #391
Fixes #823 and others.