Please tell me there is a faster way than clicking "link" 4,500 times. Multi-link?

I’m trying to link every time a document says the word God.

I tried VScode but they only support multi-cursor on a single file not multiple files so I can’t make a tag on all the documents. I’ve searched around and can’t find a select all link option.

VS Code:

Find: God (use case sensitivity and whatever else you want for restriction)

Replace: [God](

Or replace: [[God]]

Or have I misunderstood your needs?

This has been working alright for me, it gives you control over which links you want to add, though, meaning you still have to press enter for every note. It will however link everything if you just keep pressing enter.]

1 Like

Thank you! Yes, I didn’t think about replace across documents that should work.

1 Like

Welcome. Hope all goes well. For major changes like this, it might help to make a backup of the vault that you can restore if you run into problems.

(?<![[)(?<!#)(?<!#\s)(?<!#\s\s)\bWord\b worked for me. Excluding the “#” from the word search so you don’t accidentally update file names with that word cause brackets aren’t supported in the title. Also added potential extra spaces between a word and the “#” character. Note for anyone attempting this that the free version Visual Studio Code runs on a javascript regex and other flavors of regex won’t work!!!

Hi. FYI, the regex throws a pattern error:

Backslashes next to square brackets delete inside this forum for some reason. Just found that out.

Use three backticks above and below the text to create a code block that will display all the characters:


Or four backticks above and below the code block to show the block’s structure as well:



If you simply replace God with [[God]] throughout the vault using search and replace, it will break any links that contain the word God. I am not sure what the regex would be to disregard occurrences of a word within a link, but I remember a thread where someone had a solution. I haven’t tried the regex mentioned above. In the meantime, it may be best to be extra careful and use the search and replace, manually ignore the problem matches before committing the changes. Fortunately this process is easy in VSCode.

1 Like

I think you might be mistaken here. I use find/replace across multiple files all the time.

Screenshot 2023-03-30 at 6.45.41 AM

  1. Immediately to the right of the ‘replace’ field is a little button that will allow you to replace all across all files.
  2. In the line with the file name, you can replace all instances in only one file.
  3. You can exclude a file from ‘Replace all’ with the ‘X’.

There really should be a better or faster way to do this natively. Like keyboard shortcuts for the linking pane or a way to “link all” when you select a file, or even a link all across the whole vault.

1 Like

Yes, sadly. I don’t think search and replace was available for me on my free version. Maybe I wasn’t at the root directory when I was searching. Very wierd.

In VSCode, not Obsidian, this process is described above, here: Please tell me there is a faster way than clicking "link" 4,500 times. Multi-link? - #12 by cmadland

I hope this helps. Good luck!

Yes, sorry you are right VS code’s free version does have this capability shared. But you cannot limit the search to only documents excluding the title’s also that contain the keyword to be replaced. Markdown won’t allow me to have brackets in the name, and I cannot find a way in the regex to avoid title and replace document only occurrences of the keyword.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.