Toggle shortest and absolute path in vault

Use case or problem

I want to quickly switch the links in the current note from shortest path to absolute path (to get a sense of what’s going on in the note).

Proposed solution

A command “Toggle Display of Path in current file” that switches between “shortest path when possible” and “absolute path in vault” for the current document.

Current workaround (optional)

I go to the other file, and mouse over the file name to see where it is. Try to remember, move back to the file where the link is, where I’ve usually already forgoten.

1 Like

One way this could be implemented is simply to have Absolute Links display the filename in Live Preview/Reading mode. I imagine most users do not actually need to see the entire filepath while browsing/reading, but seeing it when editing is important.

(Toggling in Source Mode would be much harder to implement, as it would require literally mass replacing all of the shortest path links with absolute links in the raw text of each file, which would be no small feat.)

1 Like

maybe this plugin would make it a small feat :slight_smile:

1 Like

Well ok, but that is destructively processing all your notes. That would have implications with file dates, sync, version history, etc. Toggling the view would mean cascading changes throughout your vault.

“small feat” doesn’t just mean easy to do.

(That’s a cool plugin though. Still thank you for linking to it!)

2 Likes

The plugin mentioned as the answer doesn’t really convert wikilinks from shortest to absolute path, it converts from wiki to markdown, and then back to wiki to achieve that. More importantly, it has this bug that makes that method of 2-step converting unusable for many vaults.

I have a lot of links between notes, where a lot of notes have the same name but in different folders. Unfortunately, I’ve been using “Shortest path when possible” Wikilinks for all of my vault and I’m now realising how bad it is once I renamed a file. A lot of links got messed up. I’ll keep using “Absolute path in vault” Wikilinks, but I wanna convert all my old links to that format too. I’ll manually fix the already wrong ones.

Has anyone found a way to convert wikilinks from shortest to absolute path?

That shouldn’t cause problems. What exactly is going bad? I suggest opening a help thread and explaining everything.

There is likely a solution instead of switching to absolute. If you have some plugin glitch when renaming, maybe you’ll have the same issue with absolute anyway.

I opened a help thread, thanks for the suggestion and sorry for such a late reply.