Open mattpilott opened 1 year ago
This is what my tags actually look like at the moment, hopefully i can have it like this:
I too would like to know how to use subtags. Does it need setting up or should it work out of the box?
Assuming you keep the grouping you could edit your settings file by adding:
"todo-tree.tree.labelFormat": "${subTag} ${after}"
@eportet Could you expand on your answer because what you've shown appears to be the default value?
Right, I figured it out!
Example TODO comments I will be using in my description of the solution.
// TODO P1 Something
// TODO P2 Something else
// TODO No subtag
First you need to set the subTagRegex setting. This regex is for any text that appears after the first tag. I have chosen to look for a string that starts with an uppercase character followed by more uppercase characters or numbers.
{
"todo-tree.regex.subTagRegex": "([A-Z]{1}[A-Z0-9]+)"
}
Adding this will group todo's by sub tag in the FLAT view. (I'm not sure why other views do no work).
You can also add the subtag to your label by adding ${subtag} to labelFormat
{
"todo-tree.tree.labelFormat": "${tag} ${after} (${subtag})"
}
I hope that was helpful.
{ "todo-tree.regex.subTagRegex": "([A-Z]{1}[A-Z0-9]+)" }
THANK YOU! I cannot tell you how little documentation there is on subtags. This was a lifesaver!
Hi i'm having trouble understanding how to get subtags to work. I have add 3 tags
P1``P2``P3
and im trying to see these as as top-level tags with the[ ]
empty checkbox as the sub tag.My todos have this format currently
P3 [ ] Misc - Replace fixed sizes with clamps
How can achieve this?