Option to define the hierarchical tag structure once

Use case or problem

Let’s say I have a very large number of tagged notes and I want structure the tags hierarchically. Currently, I have to modify every instance of the tags individually.

For instance, if I have two tags tag1 and tag 2 and I want to see the hierarchical structure tag1/tag2 in the tag pane, I have to modify every existing instance of tag2 into tag1/tag2. Otherwise, I see both tag2 and tag1/tag2 in the tag pane, they’re treated as two distinct entities.

Proposed solution

Add an option to create the hierarchical tag structure once.

Something like tag1//tag2 could create an implicit hierarchical relationship between the tag entities which would automatically apply to all instances of those tags.

This way, I’d just have to create a single note for the entire hierarchical tag structure.

With the implicit relationship established, tagging a note with tag2 would be equivalent with tag1/tag2, without having to explicitly write it. This would also reduce visual clutter.

3 Likes

Because Obsidian use plain text files you can use any software to bulk change data in the files. I’ve used Atom - free editor:

and Find in project function to perform similar to your tasks
I have got now ~1800 files and ~100 tags. This tool helped me significantly.

@danitrusca
I think, one of reasons for introducing nested tags was to allow namespacing.
E.g. to treat #category1/tag2 as different from #category2/tag2, different from #tag2.

Somebody might write you some plugin/script which does:

For each file/block/line/...
	If file/block/line/... contains #tag2, then:
		Remove #tag1
		Replace #tag2 by #tag1/tag2

If you do not want that, you will realy need to do global search and replace in some text editor.

I think, suggested implicit relationships could be declared and analyzed in Neo4j Graph View Plugin which parses file contents independently of Obsidian parser AFAIK. Author @Emile would just need to include tags as recognized relationships. I do not use tags and I think they are not processed now.