So, my own comment above made me think… I Googled around a bit and found OpenIn (it’s also in the App Store). This is like “Choosy”, allowing you to set up different rules to match URLs against, manipulate them and them open them in specific browsers. Except that it doesn’t only work on URLs, but on any kind of file.
I guess you see where I’m going with this.
It took me some experimenting, but now I have normal file links to Obsidian documents, which is awesome, because they are much more stable (hook://file/...
), and they also work outside of Obsidian, like when I’m selecting a Markdown file in the Finder.
Here’s a new gist that modifies my previous one to return plain file links.
I set up OpenIn to take control of all .md
files, and I set up a rule that matches all Markdown files in vaults and opens these in Obsidian. (This took some puzzling, but in the end it worked turned out to be pretty simple. See the gist above for details.)
And it doesn’t stop there! I have configured OpenIn to use iA Writer by default, except when the file is opened by Obsidian itself. Then I use Marked 2. Which is precisely how I like it.