Tag Mass Action: Add, Rename, and Delete a tag in multiple files (Tag Wrangler)

Would love to see this as a built-in feature, please!
Thanks for the workaround with VScode btw @Vinadon

2 Likes

+1 guys!

Would help us non-coders a lot.
Hope it is simple enough to be implemented, but thanks a lot for the incredible software =)

Also, merging tags.

3 Likes

Great point. Tag lists grow over time, once every couple of months I go edit them. Some tags are the same but spelled differently, so I edit/merge them. Some tags have too few entries, so I merge them with larger ones. (It’s currently possible in Leap and Bear). Hans

3 Likes

I’d like this feature as well. I find that I often make tag names, but then over time need to change them. I’d like to learn how to solve this using coding, but an in-house solution would be great.

Would love to have this feature as well- specifically editing tags at scale.

Also find it strange that even though tags are case-sensitive (eg movie vs Movie), searching for the ‘movie’ tag throws up results of both types i.e. both ‘movie’ and ‘Movie’. Is this working as intended?

1 Like

I’m new to Obsidian and today I decided I wanted to rename a tag. This surely must be hight on the list of features to implement. I tend to slip into creating categorisation tags that imply ‘where should this be stored’ and have to catch myself and instead create more meaningful contextual tags that relate to ‘when would I like to stumble across this not again?’ Hi to the dev’s and those in the forum. Fantastic job bringing this software into the world! Thanks.

@Nebulous-Knowledge: I don’t know if you have read all the comments, but @nixsee recommends using VS Code in the interim. I tried it, and it works well, and it is not too cumbersome a workaround.

Simple work around to Rename and Delete tags:
Elaborating on @Vinadon solution, just explaining it in more details and with another tool
The main idea is just to perform a simple find and replace in all files using another free app
Here the steps:
Download Notepad++ (or any other tool that can perform serach and replace in the contents of text files)
From the main menu go to Search-> Find In Files
In the search fields insert your current tag in the search field, the new (renamed) tag in the replace field and the directory of where the notes are (check subfolders is available too)
Hit replace in all files and enjoy :blush:
To delete a tag from all files do the same and just hit space in the ‘replace’ filed

Hope this helps

6 Likes

Another possibility: the Tag Wrangler can now rename tags, and does so intelligently for both body tags and front-matter ones. It uses Obsidian’s own indexing to know what is a tag and what isn’t, so it won’t change things in e.g. code blocks or comments. Do review the docs and make a backup before you start renaming, but it’s now an option.

(I’ve considered adding tag deletion as well, but given that it’s a destructive operation with no undo, well… seems better to do it with an interactive search and replace, or to just merge the tag into another tag – i.e. rename it to the same as an existing tag. This will “delete” the old name from the tag pane, at any rate.)

27 Likes

Thank you so much for the plugin. :pray:
I can do workaround for tag deletion by renaming to #deleted (and will delete the tag in a note when see it).

1 Like

Now that the great Tag Wrangler plugin is around… would we be greedy if we ask for a ‘Tag several notes’ function to be added in its next update. So one can select a few notes then assign them all a tag from the tag pane (or tag list). This feature is avaiable in both Evernote and Joplin, so I think its fair tohave it in Obsidian too.
And of course Many thanks for the great plugin

4 Likes

I thought about adding that feature, but the question is where to add the tag? In front matter? At the start of the document? The end? Should it be wrapped in a comment?

Too many possibilities and options. I suppose it could check if there is already front matter, and if so, add it there, but I don’t much like the idea of creating front matter in notes that don’t already have it.

3 Likes

Thanks for creating this. I would say start at the very beginning, a very good place to start.

And maybe they could be commented out at the beginning if the note already has commented out content. I think that would be helpful for some as default behavior.

Thanks.

I agree with you in not creating a front matter if it is not there. Personally, I don’t use front matter. I use tags extensively (sometimes 10+ tags per note), and I always put them at the very bottom of the note. Seeing that amount of tags at the beginning of it might be a bit annoying for me.
Also, I don’t think wrapping the tags in a comment would be a preferance for most users (might complicate the search too)
So, can I be greedy again and ask if you can make it a choice in the options of the plugin, so the user can decide either to put them at the very beginning of the note or the very bottom? If this is not doable, then my +1 would definitely go for the ‘end of the note’
Thanks again for the great plugin, and have a nice day!

2 Likes

At the moment I don’t have a use for tagging in this way, so don’t expect such a feature any time soon. :wink:

As for comments, it would not complicate the search since the new %% comments do not affect search. They simply prevent rendering in the preview.

Anyway, as you can see from the differing opinions in this thread, a configuration setting would be required. And I’m pretty sure there would still be people wanting it to be added as a list item, or under some subheading, or yet another way of doing it. So I’m not going to start down that road unless there are sponsors for that sort of work.

If I did implement this feature for myself, though, I would lean towards creating front matter, if there was a way to collapse it by default in editing mode. (I understand the latest Obsidian persists folding state, but that may not be enough since I’m not sure if that persistence is for the actual note, or just any open view of the note.)

Even so, that’s further down my priority list for Tag Wrangler at the moment; I’d be more likely to implement “tag notes” first: i.e. being able to click on a tag in the tag pane and have it open a note that has an alias matching the tag name. (And ideally, make clicking on tags with such a note open the note instead of the search.)

5 Likes

What’s the status of this request? I’ve seen only its tag: valuable.
I have no intention of using software in which editing is prevented to this degree.
Service providers are not supposed to prevent people from using their service.

1 Like

This sounds a bit rude - specially considering that the software is free to use. Anyways, if you would have taken the time to read a couple of the latest reply´s - you would have found that there is a 3rd party plugin that solves this already.

5 Likes

I was surprised how easy it was to edit and delete tags even without the feature in Obsidian or use of plugin. It can be done manually via a mass search and replace of tags across your vault using other free software (allowing you to edit (replace tag with desired version) or delete (replace tag with nothing)).

I think it is a natural reaction to be annoyed with small problems when you really like most everything else. So in a way the “rudeness” may be a sort of compliment. Like the moment everything seems too good to be true and you realize it wasn’t true. But it is still really good and therefore approaching that too good you initially imagined.

But this can only happen when people truly work together. And some people attempt to help in unique and misunderstood ways at first but can come through strong later. I will hold out hope. And, I will admit I was a little frustrated trying to accomplish certain things when I started back in August but mostly everything I was concerned with either had other solutions or has been solved.

Sorry for the ramble. I just wanted to welcome @Julian.Dumitrascu to a great community here that will totally forgive and forget any disappointment you may have with the hopes you stick around and be part of the solution.

Thanks.

6 Likes

Thats a good advice for sure, thanks for the different perspective.

2 Likes