Make Obsidian a default app for Markdown files on macOS

You can try eliminating the second-long wait, but I didn’t get good results with that. If you want to, comment out lines 84 and 100 of the script, the ones saying

sleep 1

The problem these lines try to solve is that it takes a bit of time after the script puts a link to a file inside the vault, until Obsidian has noticed the new thing in its vault and is able to open it. Without the delay, I often get an error from Obsidian: “file not found”.

This only occurs when the link is first created. The next time you open the same file, if you haven’t deleted that link in the meantime, it opens immediately.

1 Like