vscode-markdown-notes icon indicating copy to clipboard operation
vscode-markdown-notes copied to clipboard

Nested Tags

Open ChristinWhite opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. Nope

Describe the solution you'd like I'd love to have nested tag support. Either in a limited way like Obsidian or in a more flexible way like Bear.

Obsidian style, no spaces: 
- #Status/In-Progress
- #Timeline/2021/03-March/11-Thursday

Bear style, spaces with a trailing number sign:
- #Status/In-Progress
- #Timeline/2021/03 March/11 Thursday#

Describe alternatives you've considered It is possible to do tags using dashes instead of slashes but it makes it a little harder to read. #Status/In-Progress is significantly less ambiguous than #Status-In-Progress and it looks nicer and carries more obvious meaning than #Status_In-Progress or #Status-In_Progress.

Additional context Nested tags certainly aren't as necessary when you can organize files hierarchically, it's more important in Bear where tags are the only way to organize notes but they are really nice to add additional context to the tag and expand compatibility. I primarily use Obsidian right now but it's really useful to also be able to open my vault in Visual Studio Code instead for certain functions and have as many Obsidian features supported as possible.

Adding spaces support would be a compelling reason to consider switching to VSCode full-time for my PKM. I would never sneak two requests in as one. 😄

ChristinWhite avatar Mar 12 '21 00:03 ChristinWhite

By the way, neuron calls these hierarchical tags. They currently are not recognized by this extension:

image

Allowing /, - and _ would be sufficient to support them, and it is simpler to change the regex parser for this; not sure about the whitespace variation.

For tags with whitespace, neuron supports what are known as 'tag folgezettels', eg: #[[Pork Rinds]].

srid avatar Apr 11 '21 16:04 srid

Adding "/" to acceptable tag characters seems fine. Dash and underscore are already in there:

https://github.com/kortina/vscode-markdown-notes/blob/master/src/NoteWorkspace.ts#L73

Down to merge a PR if someone wants to whip one up (and add tests!)

kortina avatar Apr 13 '21 00:04 kortina

@kortina You might want to add the "good first issues" label to this issue; GitHub's Explore filters for that label to increase the reach of such issues I believe.

https://github.blog/2020-01-22-browse-good-first-issues-to-start-contributing-to-open-source/

srid avatar Apr 13 '21 01:04 srid