Meh. As was stated, MAC only. Not a broad solution for everyone.
just want to add +1 for this feature please
I’ve been using Obsidian for a year now and I love it! Would love it even more if it had this feature and made things even better to use.
great plugin, works like a charm
Is there possibly any way you could make this in a way that not every instance needs to be confirmed? I like your tool, but what I wanted to do brought back about 1000 results – and currently, each ‘find & replace’-set needs to be confirmed separately.
Honestly, I’m dismayed, especially after looking at the roadmap and not seeing anything there to address this.
When I did a quick check into Obsidian, trying to find refuge for my OneNote data, I discovered the “find and replace” dialog and was sooo excited (my free OneNote didn’t have it); it never occurred to me that it would be a function limited to the current document. Isn’t that what a software containing lots of files is meant to be there for? Manipulate content en masse? There seems to be a real lack of support for this, and it’s left up to community plugins; similar to mass-assigning tags. I don’t get it. Yet the mindmap-graphy-thingy is built-in.
I’m ready to leave again. Or at least take my content, move somewhere to clean it up, and then come back.
Using another app for this is a common solution, and one of the benefits of Obsidian storing notes as text files. VS Code is a popular choice; BBEdit is an option on Mac. Make sure to back up your vault before changing many files at once.
You seriously recommend someone install a massive software like VS Code and learn this in order to perform functions that (to many people) should be a core function inside Obsidian?
I am seriously suggesting than when a feature you want doesn’t exist, and an external tool does, one consider taking advantage of the ability to use other tools on their notes. It may not be your most preferred path, but it enables you to accomplish the task while waiting for the feature. If you dislike VS Code there are other options, as I clearly indicated. Learning how to search-replace in any app is unlikely to take long; it’s mostly just finding the menu and looking at the options. If you prefer to postpone your search-replacing until you can do it in Obsidian, you’re free to do that too.
For Linux? That are not console-only? Please let me know of any.
I’ve asked the same question in a Linux forum and – as anticipated – am criticized for daring to ask for a GUI-based solution instead of just putting in the effort to learn sed, darn it…
Ironically, my question for a GUI for sed was scoffed at, because – as per the commenter – books on sed are 100s of pages long. Which proves my point completely. By the way, I also asked there for a GUI-based alternative for a search & replace for clear-text-files like .md to be used on multiple files over several folders. Nothing there yet either.
Is it rocket science after all?
I think I heard recently that the text editor Kate has that feature. I’m not on Linux anymore so don’t know what’s available, and the editor I used (Geany) lacked the feature (tho it could search across files, and replace across open ones). But I will validate your desire for a GUI solution. That is a reasonable thing to want!
Not a Linux user but Sublime text and ultraedit are both available on Linux. It’s also possible to run notepad++ too
Thanks.
Meanwhile, someone on the Linux Mint forum recommended regexxer – and I’m excited! This is exactly the kind of simple tool that can work for me as a workaround, until Obsidian decides to add the function.
Already tested it and it works fine. ![]()
I was just about to suggest regexxer. I would still suggest you become comfortable with console. The barrier to entry is primarily psychological but once your past it, it’s super powerful and simple. You’d just use a simple single line sed for this and you can also do compares and diffs easily enough once your brain has learned to accept console as visual input.
That said, I use vscode for this when I need to do vault wide find and replace. It allows me to do a lot of other mutations on my data as well, but I tend to review and refactor code I’ve written in vscode with the help of LLMs so it’s got other uses.
Re VSCode, since you mentioned it and know it, would you mind answering a question I have?
As good and helpful as regexxer is, it’s annoying that I have to run ever search & replace separately – I copy & paste from a file, but still have to do the iterations, which I do about once every week or whenever I copied and pasted a lot of text. Does VSCode allow for a set of search & replaces to be bundled?
Years ago, while editing books, I had created Word macros for initial clean-ups of documents. It was relatively easy back then, thanks to Word’s macro-recording function.
With work, household and family, I seriously don’t have any bandwidth these days to learn anything massively new – Obsidian itself is about the most complex thing right now, which I’m only attempting at this point because of M$'s changes to OneNote.
Windows users may use grepWin or dnGrep.
Both are great tools which works well with Obsidian folders.
I found a couple sources which imply it is possible, but I do not ever use vscode or guis for processes like these. I included a links below[1] in case you want to learn how to do that, but if you wanted, and are on linux, it would be easy to run a simple command to do the search and replace and this could be made as simple as you like. DM me if you’re interested and we can have a quick zoom or w/e and I can give you a quick custom tool for it once I understand your specific usecase.
Also, if you haven’t already done so, make sure to like the OP to indicate your desire for a better find and replace in Obsidian.
[1] https://stackoverflow.com/questions/49632016/how-to-automate-a-simple-regex-find-and-replace
Thank you for the offer. I don’t think my usecase is that unusual.
I’d rather someone came up with an easy-to-use plug-in here. Something like this (link to an image):
mediamonkey regex find and replace addon
(Here is the site for the mediamonkey addon, with many more details, in case someone who knows regex well wants to get inspired to build one for obsidian.)
Also, I’m a bit confused – you did write in the initial post, the one to which I responded – that you do use VSCode for this type of task; now you say you don’t. ![]()
Thank you very much for the link; it is quite helpful.
Meanwhile I keep using the run-each-command separately routine as an exercise in patience and zen.
No, I use vscode primarily for this because I use it for other tasks, but the context of this conversation is your desires so since you do not want to install vscode (which is reasonable), I concur that regexxer is a good bet. HOWEVER, I was saying that your actual task is really easy to do with sed* (though it is capable of FAR more which is why the docs on it are so long) and that it would be good to break that barrier to entry into cli so that you can make your life easier without having to waste time and effort trying multiple tools.
You can keep hopping around from tool to tool or you can pick one and fill in the gaps with your own knowhow or that of others online. Knowing some basic cli and becoming relatively comfortable with it makes it a hell of a lot easier to fill those gaps in tools like text editors.
For example if you want to do several search and replaces at once, that’s like maybe a few lines of sed in a for loop. Maybe 5 lines total to replace 5 different words, or a loop** of 4 lines to replace as many as you like. It’s a little bit challenging for most people coming from UI, but it’s simple syntax once you take the time to look at it, and a great way to familiarize yourself with CLI.
If I were doing a few at once, that is certainly the way I would go because I could do it so much nicer than is possible in any GUI. This makes sense because crafting a UI involves far far far more coding than 4 lines, which is why folks use cli for those sorts of tasks instead of creating GUIs for them.. By the time they have updated a GUI to do this right and fixed bugs and faced intigration hell, they’d have already finished the rest of their project a few days past… assuming it only took them a week to draw up all that front end code. I suppose you could do it faster now with vibe coding but you still need to know what you’re doing and it just gets too complicated. Easier to just use a couple simple lines in cli.
Also worth noting that running each command seperately is not just an excercise of patience and zen, but often good practice, as it can often be easier than you’d expect to start confusing yourself once you start making a lot of changes at once to anything.
Footnotes:
* Here’s a quick standard 1 liner to replace all of a given word in all the files in a given directory (includes subdirectories):
find /path/to/directory -type f -exec sed -i 's/old_word/new_word/g' {} +
Quick breakdown:
find /path/to/directory: Starts the search in your specific folder.-type f: Ensures it only looks at files (ignoring directories).-exec ... {} +: Runs the following command on every file found.sed -i 's/old_word/new_word/g': Swaps the text in-place (-i) globally (g).
Note for macOS users: If you are on a Mac,
sed -irequires a backup extension (even if empty). Change the command to:sed -i '' 's/old_word/new_word/g'
** Here is a for loop which will replace all the old words with the new words (‘old1’ etc are just place holders for your words.
for pair in "old1 new1" "old2 new2" "old3 new3" "old4 new4" "old5 new5";
do read -r old new <<< "$pair";
find /path/to/directory -type f -exec sed -i "s/$old/$new/g" {} +;
done
What changed:
-
for pair in ...: Loops through your 5 sets of words. -
read -r old new <<< "$pair": Splits the pair into two variables ($oldand$new). -
sed -i "s/$old/$new/g": Uses double quotes (") instead of single quotes so Bash can swap in the actual words.
If I did this often enough I’d flesh it out to something even easier to use which takes inputs and is interactive, but like I said, I tend to use vscode for mass replace since I have it open already.
Ditto, would love this as a feature.