so the new Obsidian update gave us properties, which is a really great update to metadata that I’ve already been enjoying. However, certain fields got deprecated in the update, meaning that all my ‘alias’ fields needed to be changed to ‘aliases’, and my ‘cssclass’ fields to ‘cssclasses’. That’s a lot of files to update, and i have a finite time on this planet.
this is not the first time I’ve needed to bulk change a word in my vault, either (we don’t talk about how many times I changed Naazgarash’s name). doing it manually? madness. but there is a better way!
there are a bunch of text editors out there, and the one I use is called Sublime Text. I like it because it’s simple and straightforward, and now I’m going to show you how to use it to mass-edit text in Obsidian.
First, go install sublime text. Next, you’ll want to open the vault you want to edit in the program, and since Obsidian is all files and folders, you simply go to File → Open folder → select your vault folder.
Next, you want to open up the find-replace function. You can do this three ways:
right click the folder you want to look in, and select ‘find in folder’
hit ‘Find’ and then ‘find in files’
Then you get this lovely thing:
(click the image im sorry it's so small it's just. wide)
This is your new best friend. It has options on the left for regular expressions (witchcraft i do not understand), case sensitivity, and exact word matching. Now all you need to do is type in the thing you want to find, and what you want to replace it with.
For replacing properties, you’ll want to do something like this:
I recommend including the : because if you don’t, anywhere you already have ‘cssclasses’, it will find the ‘cssclass’ part of that word and replace it with cssclasseses which is not what you want.
Next, hit ‘find’, and sublimetext will find and open tabs of every file in your chosen folder with that search term. Hit ‘replace’ and it will give you a prompt to replace however many of your word it found across however many files.
Depending on how many files you have, the replacement might take a little while. It took a couple of minutes for it to alter everything in all 3k+ files in my dnd bestiary. When it’s done, go to file → save all, then file → close all files, and you’re done!
It’s that simple! It will make you mad with power because you can change so many things. It will save your ass when you decide to change a character name and need to alter it across your entire vault.
For further visual instruction, please see the video that taught me how to use this program, Sublime Text in Obsidian - Josh Plunkett