Have Obsidian be the handler of .md files / Add ability to use Obsidian as a markdown editor on files outside vault (file association)

How many PKM apps do you know that can do this?

1 Like

@Dor
I am not versed in the available PKM apps.
I switched to Obsidian from a plain text editor.

And therein lies the difficulty. Obsidian isn’t a plaintext editor, it’s a PKM app that contains a plaintext editor. Most PKM apps work with databases - Obsidian is one of the few that work with files.

The only PKM app I know that can open any file is Tangent Notes. Similar to Obsidian in some ways (much of its syntax) but not in others; has far fewer features and no plugins or themes. Foam and Dendron are VSCode extensions - there’s always a chance they will suit you better. I don’t know if they can open any file - they both limit their workspaces - but you ought to be able to achieve a similar look and feel with VSCode in standalone form.

The alternative is to use an editor as well as Obsidian. I will often work simultaneously with Tangent, Typora, EditPad Pro and Obsidian (I use it mostly for Canvas now). Writemonkey 3 too, which launched its latest version in January. That may or may not suit you, but it is pretty efficient.

4 Likes

Even without having the ability to edit files without opening an obsidian vault, I love the ability to open markdown files directly from my system and the vault that contains that .md file open to that file. That would be extremely helpful, alone.

@Galileji, I like your idea, but I am not sure it would be simple. Anything with file systems is not simple, especially since it would be different for Windows, Linux, and Mac. However, you could maybe make a plugin for just one of these systems and plugin developers with more experience on the other systems might run with it.

Zettlr can also open .md files anywhere.

I have plenty of markdown editors installed—iA Writer, Typora, Zettlr, MarkEdit, Byword, VS Code with markdown extensions—but I don’t like any of them as much as I like the text editor in Obsidian. That’s what prompted the feature request.

4 Likes

+1 editing standalone markdown files outside vault, at least for mobile devices is a critical feature since there is not any good markdown editor available as good as Obsidian on the mobile market that can open standlone markdown files from OneDrive, Google and Dropbox.

3 Likes

It is a nice idea. I could be set up so that one can choose which vault settings be used when opening that file. I could be like clicking on the file. and then obsidian asks you which vault do you want to open, (like it does now) but it opens that vault and only opens that file with those settings. I usually use MarkText for opening single MD files and it is fine but it is a good alternative to that.

1 Like

I would be happy to write such a plugin, but I’m afraid I completely lack the expertise to do that :sweat_smile:

1 Like

I’m the opposite—I most want to see this on desktop, but in part that’s because I use an iPhone and know it’s probably not feasible on iOS.

+1
I don’t really see is as that complicated as some people say.

i’d go with this approach

  1. start simple, apply KISS - create simplest working solution.
  2. improve later if it’s working.

Some ideas.

  1. Let Obsidian to open external files with default settings. (Default settings already exist, otherwise you could not create first vault.)

  2. create default vault for device or set one of the existing vaults as default to be used by obsidian in case there is no vault present in file location.

As a bonus - “2.” helps to deliver other requested feature = sync settings and plugins between vaults by opting to use default vault’s setting across all present vaults.

Difficulty of this depends on the code-base but generally “1.” should be doable even if there was temporary root/.obsidian folder next to the external file because it would basically not change behavior of the app at all.

As workaround i will most-likely use the following.

  • DropIt or/and python/ps script
    • to automate syncing *.md files between vault and folder that includes my projects.
    • to sync settings and plugins between vaults
  • DropIt or/and script
    • to setup softlinks to vault but this is kinda restricting.
2 Likes

Yes, please. Was surprised the first time I tried to open and it didn’t.

1 Like

+1 I want to use the markdown editor component with all .md files (or specially choose to open with Obsidian for any plaintext file). I don’t need any vault related features or indexing, except for things like searching within the one file; I would prefer to keep user hotkeys and keyboard shortcuts but that is not a must — I still prefer Obsidian’s editor with default settings; no plugins need to work whatsoever (though that would just be a cherry on top).

2 Likes

+1 from me as well, and I’m also surprised this isn’t already available out of the box. Seems like a massive lost opportunity.

3 Likes

This is a perfect workaround for now! Thank you very much!!
You managed a very clear and understandable instruction so it was easy to implement.
Thankyou! I now can open .md files from anywhere on my Mac and perform simple edits.
Only downside is, that the temp folder doesn’t get deleted automatically. But heck, I am willing to delete the folder manually once in a while to achieve global opening of .md files!
Great work!!

1 Like

Definitely put my vote down for that opportunity!

1 Like

+1 for request.

Obsidian must be open in order to make edits, so it doesn’t matter if Obsidian can or cannot open markdown files.

Obsidian stores files in an open “database”, so it knows where to search for all its markdown files

Maybe Obsidian could import / move outside markdown files but then, into which vault? The current one if a vault is open or yet another vault if Obsidian is closed and you’ve more vaults?

Obsidian handles files based on their open database concept called vault. It’s not about markdown but knowledge management inside an open database.

I just tried linking the file to my Obsidian vault (I think I saw that mentioned earlier) and I just did from Terminal (MacOS)
ln -s <source-file> <target-file>
where <source-file> is the original file
and <target-file> is the new Obsidian file name.
Seems to work just fine for me.

+1 for this.

Just re-release the editor only as a new app and charge $20 for it. Shoot iAWriter is charging 50 and the obsidian editor is much better.

For iOS this would be a huge win for the editor. Throw in the iOS commands for quick editing and allow a “template” folder somewhere and I’d gladly throw money at that app.

Would it be a scaled down version of markdown that opens files from Apple files on mobile…yep. Would not want this as a feature of obsidian directly as it’s a bit confusing, but calling it obsidian editor or something separate to clarify what it does and play off obsidian branding probably won’t hurt.

3 Likes

Use case or problem

When I set *.md files in gnome to open in obsidian, it simply doesn’t open that file. This includes markdown files that are within the vault (so the full path is known). If obsidian is already opened, it has different behavior by opening the launch screen, not even the open app.

GNOME version: 43.6
OS: Debian GNU/Linux 12 (bookworm)

Proposed solution

Open the markdown file in obsidian. (Particularly when the file is already within the vault).

Current workaround (optional)

Don’t associate obsidian as what markdown files open with

Related feature requests (optional)

Similar request:

1 Like