Global (Mass / Vault-wise) search & replace

I just store my notes folder in Nextcloud. Nextcloud provides the version control.

2 Likes

+1 for a global search and replace (without going to VS Code or the like).

1 Like

+1 for search and replace!!!

1 Like

+1 for global search and replace! thanks~

1 Like

+1 Long-term users are bound to find better systems and make changes to the structure of their Obsidian vault - without a global replace function this becomes pretty difficult.

2 Likes

I use the tool “grepWin” in Windows (10) Explorer for such purposes. Right click on the note-folder, search and replace - done! I have backups of all my notes, so there’s no worry. Works also with YAML Metadata.
https://tools.stefankueng.com/grepWin.html

1 Like

Here is the solution to this issue with Sublime Test app: Find + Replace in multiple files - Technical Support - Sublime Forum

1 Like

Would love to see this, with support for regular expressions like in VScode; I’m aware I can open my vault in VScode, but it would be a major improvement for myself if this was supported in Obsidian.

3 Likes

+1 For search & replace, please!!!

4 Likes

It seems that Atom.io is no longer available since december the 15th 2022
:frowning:

Getting desparate lol. We neeeed this :man_dancing:

4 Likes

+1000 for this feature

3 Likes

Oh, yeah It will definitely be helpful and will help me do,
Feature Request: Changing Tags to Links and vice versa

If I am too lazy syncing to GitHub and heading over to the PC, I make a regex search and replace on a full directory (I just did) with the Linter plugin.
I rename my data.json file in the Linter directory to something else beforehand in the Taio app (iOS) and run an individual search and replace.
I am pretty sure it can do a vaultwide job too.
Beware the limitations with regex on mobile, though.

2 Likes

I created a plugin that allows you to search, find matches, and replace specific matches in right from obsidian.

Right now, it supports case-sensitive matching only.

I plan to add a switch for case-sensitivity, and regex, and replace all support.

I have submitted a pull request to get it on the obsidian plugin marketplace.

Here’s a link to learn more:

I hope this helps some of you, at least. Please let me know if you have any comments on the code, or requests.

8 Likes

Many options out there, just sharing one that worked for my simple use case: replacing a string across all files in the vault. http://findandreplace.io/

I reiterate: make a backup first!
Also hoping this function makes its way into Obsidian.

Nice! I’m cautiously sticking to established third-party apps for now, but watching with interest.

1 Like

I have a lot of notes that all use the same templates, so they’re all laid out the same way and look very similar to each other. I have a “gift ideas” note for each of my friends and family members, and they all have “headers” that are just bold regular text, and I just decided they would be better with actual headers, instead.

What I would like to be able to do, is go into the command palette and select “Search & Replace in all files” and replace all the “Gift Ideas” headers with “## Gift Ideas” so that it changes the headers in ALL my gift ideas notes. (I don’t have other notes with headers that say “gift ideas,” so it wouldn’t be a problem.)

Unfortunately, that’s not a feature. We have “Search in current file,” “Search in all files,” and “Search & Replace in current file,” so I’m sure “Search & Replace in all files” would be a doable feature to add, and I know I’m not the only one who can benefit from it.

1 Like

Did you read the previous posts?

I seem to remember skimming through this thread before and text editors like VSCode, Sublime Text or Notepad++ mentioned.
Quit Obsidian, and carry out the SearchandReplace (I use Notepad++ mostly to do that).
Your case is pretty straightforward as there is no need to use regex patterns*. A vault-wide regex search and replace is also done with the programs I mentioned.

When you do replacements in the future it’s good to have Git as version control, so you can see in Github Desktop what was changed and how (successfully or not) (in which latter case, you can discard changes and revert back).
This is how I do it.

* You could still use regex though to anchor your search to the string starting a line, like so:
Search: ^(Gift\sIdeas)
Replace: ## $1.
Make sure regex is ticked on in your text editor.

This latter way is just to set you on track with regex, as in your case it is not really needed.

Their new post was merged into this thread to keep everything together, and a record about the global search+replace requests.