What I’m trying to do
I would like to know if it’s possible to “find and replace” text throughout a vault or if it’s only possible within individual notes.
I would like to know if it’s possible to “find and replace” text throughout a vault or if it’s only possible within individual notes.
Not in the core. VS Code is great at opening vaults and completing small or massive search-and-replace runs throughout a whole vault.
There is currently no core Obsidian ways to search and replace
You can see the feature request here,
The feature appears to be on the roadmap according to some insiders
Currently there are a couple work arounds!
This plugin is not available through the community plugin browser. You should behave with caution but, the plugin’s code looks safe and there aren’t any reported issues!
obsidian://show-plugin?id=obsidian-linter
The linter plugin formats and styles your notes based on custom settings!
You can perform a global replace using “Custom Regex Replacement”
Its important to read,
In order to understand regex replacement. However, you still need to use caution when using it. Regex isn’t a simple concept and its easy to mess up. In this case, it could wreck your entire vault
Make sure to backup your vault before continuing
After specifying the text you want to find and replace, you need to run “Linter: Lint all files in the vault”
Remember to remove the custom rule after running it (if this is a one time search and replace)
Make sure to backup your vault before continuing
In addition, be cautious when using this application
You can use Visual Studio Code by opening your vault in VSC and using Ctrl + Shift + H
obsidian://show-plugin?id=open-vscode
Using this plugin allows you to open your vault in Visual Studio Code in seconds
In addition, “You can use VSCode for various purposes with your vault, such as for git version control, markdown formatting with Prettier, linting with markdownlint, mass formatting files and more.” - NomarCub
obsidian://show-plugin?id=tag-wrangler
Best of luck! Have a great day
Another semi related tool is the PowerRename utility for Windows. It can be helpful when used in conjunction with a vault wide search and replace. The ability to use regex to rename a bunch of files programmatically is very helpful. And then you can use VSCode or similar to properly update all the links to those notes. Here’s a relevant feature request: Bulk rename notes updating links
Thanks!
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.