obsidian-plugin-todo
obsidian-plugin-todo copied to clipboard
Feature Request: Exclude subtasks
If a parent todo is already in the list, I would like the option to exclude all of its subtasks. So only include top-level todos from my notes.
Right now todos are found by a regex on a file’s contents (at TodoParser.ts#L5):
const pattern = /(-|\*) \[(\s|x)?\]\s(.*)/g;
Let me think:
- Todos without any leading spaces may always be added, because they don’t have a parent. That’s not so difficult:
const pattern = /^([-*]) \[([ x])\] (.*)$/gm; - Todos with leading spaces may only be added if none of their ancestors is a todo. Is such logic even possible with regex?
Right now todos are found by a regex on a file’s contents (at TodoParser.ts#L5):
const pattern = /(-|\*) \[(\s|x)?\]\s(.*)/g;Let me think:
- Todos without any leading spaces may always be added, because they don’t have a parent. That’s not so difficult:
const pattern = /^([-*]) \[([ x])\] (.*)$/gm;- Todos with leading spaces may only be added if none of their ancestors is a todo. Is such logic even possible with regex?
Have you succeeded with this self-modification attempt?
To plugin author: that might be great to put that regex into settings, with some community updated templates provided.
My first concern after start was that as if i do checkbox, that's not always a myown todo. So i would really be happy to split syntax of MD checkboxes with todo with some additional symbol.
Moreover, such an additional symbols might turn out a great shortcuts for tags, e.g.:
- [ ]+0 = #today
- [ ]+x = #someday
- [ ]+N = scheduled + N calendar days etc
Have you succeeded with this self-modification attempt?
I have, to some extent: #19. Not sure if @larslockefeer is active here, but I’d love to help the plugin with this and other pull requests. Maybe I’ll just fork and improve there instead...
Hey! I'm a bit occupied at the moment with some personal matters (moving etc.). I'm wrapping that up in the coming month, after which I plan to get back to all activity here. Have ideas for fixes for most of the issue reports and had a cursory look at the PRs but need to do some in-depth reviewing etc. before I can merge.
Does it work for you if I get back to this in July? Thanks 🙇
Does it work for you if I get back to this in July?
Sure, no worries