Is anyone aware of ANY way we can delink/unlink mentions efficiently?

Hello, Obsidian fans and pros, :wave:

I am trying to clean up my vault a little bit, there are some notes I no longer see value in having them linked to every occurrence adding clutters to my graph & vault - So I would like to remove all of the linked mentions that they already have and I thought that would be refreshing (and necessary at this point!)

I imagined obsidian would have this feature, but I just checked pretty thoroughly, seems like I was wrong about that?

to rephrase my question: manually clicking into every mention and manually deleting the “[[” and “]]” of every occurrence is extremely time-consuming with some notes that have hundreds of mentions, this can’t be the only way to achieve my objectives, right? :flushed: :flushed: or perhaps using a third-party plug-in or software or literally anything?

I would be very grateful if someone can teach me how to do it!
any input appreciated, <3

1 Like

I approve of this idea, but so far am not aware of a solution.

1 Like

One of the benefits of the plain-text, own-your-own-files system that Obsidian uses is that you could write a little program outside of Obsidian to do this: e.g. a shell command that goes through your vault recursively and searches for the mention, and replaces it everywhere with however you want it replaced.

I think this should be fairly easy, but I’d need to do some research on how to do it. I always forget when to use sed vs awk vs grep but I think you’d probably want to use sed.

As a #feature-requests it could be nice to have an ignore list, which tells Obsidian to ignore certain files in graph view. It sounds like @HongDaLiNi is mainly concerned with clutter in graph view, but it would probably still be useful to keep the original mentions for navigation. An ignore list would say “keep the mentions to this file, but don’t show in graph view.”

2 Likes

thank you for replying,

i’m not familiar with the shell command at all, could you please hint me to the right direction to actually achieve that?

well, personally, i’d like my graph to show every link in my vault, that gives me a quick overview of everything and that’s why i want to remove all the links that i no longer see value in, so that i can preserve only the valuable ones; then with that, i would be able to tell, for example, which topics (note nods) have i been putting most of my energy & time into building my knowledge and see the relationships between them at a glance, etc. etc. and this is the reason why i LOVE Obsidian.

If i start using an ignore list as you proposed, there would be a lot of those valueless connections hidden under the carpet, not actually contributing anything and giving me discomfort for knowing that they still exist LoL

but of course that’s my personal preference, I’m pretty content with the features Obsidian offers at the moment

:handshake::handshake::handshake:

i hope there is a way to do that,
and additionally, it would be really sweet if we can do the opposite efficiently as well - to link all the unlink mentions with one click

these two features will certainly give Obsidian even more flexibility, making it even more appealing

on top of @unrelated suggestion on using sed, awk or grep, and if u need a solution right now, i highly suggest using vscode to achieve the very same thing.

once u have vscode installed u can open your vault with File > Open Folder and choose your Obsidian vault. then use Find in Folder... to search and replace content of your notes/files. vscode is better at bulk search and replace. u can see at my screenshot below that u can choose to replace only certain links or all links it found.

2 Likes

@efemkay’s suggestion is a much more accessible approach to doing the same thing.

When you’re doing the Find & Replace you could set replace to something like [[link]] so that the link text remains, but the link is broken. When you want to reconnect the link, you would do the opposite Find & Replace.

Unlink
Find: [[Link Text]]
Replace: [[Link Text]]

Relink
Find: [[Link Text]]
Replace: [[Link Text]]

Instead of [[ you could also use any symbols you like – the goal is just to use punctuation that will let you find the mention again.

1 Like

INCREDIBLE.

i’ve tried it and it does exactly what i wanted to do!! i just need to do it for each aliases of my Obsidian notes

vscode looks pretty powerful; never knew software like this that can find & replace the content across a range of plain text files :+1:t2::+1:t2:

thank you soo much! this not only solved my initial problem but also will definitely be very helpful in future scenarios :smile:

yes, @efemkay‘s suggestion was a perfect solution to do this.
thank you for bringing it up too :pray: :smile:

hmm :thinking: for this i think the Unlink Mentions feature of Obsidian does this pretty well for me

@efemkay provided a solution to achieve this using an external software, check it out if you like

Thanks!

This solution is inspiring.
I used to use the sed. But, after reading your post, I tried the Atom. The Atom can do the find and replace for the files within the folders in a project.

1 Like

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