kortina / vscode-markdown-notes

Install from: https://ark.dance/md-notes
GNU General Public License v3.0
427 stars 65 forks source link

Nested Tags #132

Open ChristinWhite opened 3 years ago

ChristinWhite commented 3 years ago

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. 😄

srid commented 3 years ago

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]].

kortina commented 3 years ago

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!)

srid commented 3 years ago

@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/