Allow Opening and Editing of any plain text file in Obsidian

None of the plugins listed here actually work. They are limited. It would have been really nice if Obsidian supports other plain text variants.

1 Like

I’m managing a lot xml so I’m in the same case. I found this plugin : plaintext which allow me to do this. With it you can edit all xml like md files.

@Dellu @crabtronic my plugin is now published and should work… sadly it hasn’t been added to the base product but I hope this works for your needs!

2 Likes

Sorry forgot to let you know it was all ready too!
cc @drventure @cwhiii

1 Like

What does your plugin do that txt as md doesn’t?

You can use it to view and edit any plaintext file extension you add to its list, but Obsidian still doesn’t treat those files as equivalent to .md. Does your plugin do more that that?

The main benefit here is that “Custom File Extension Plugin” allows you to select many/all types of files to view & edit directly in Obsidian, rather than just .txt or .csv.

2 Likes

Txt as MD allows that too.

As far as I and it seems other can tell: It does not.

Can you explain and maybe provide a screenshot or two?

It’s been mentioned elsewhere too

In the post you linked it is said that one can add other extensions by editing the main.js file. This is not a viable option for many users.

The Custom File Extension plugin allows you to do that using settings and a JSON object.

Finally, the plaintext plugin allows for extra extensions to be added in a comma separated list in the settings.

The final two are understandable for most people and somewhat easy, whilst the first is not.

The middle one is also maintained recently, whilst the other two not so much. Not sure why, but I’m still using the plaintext variant.

1 Like

Ease is one thing, extra features were my question. Asked because new plugins appear often without explanation of how they differ from existing plugins. The answer was that txt as md doesn’t allow any plaintext extension which is incorrect.

Maintenance isn’t necessary when plugins still work as intended. Another way of judging plugins is by the reputation of the developer.

Sorry, you can open any file in Obsidian.

Preferences > files & links > detect all file types

You can’t.
That option only allows such files to be seen in Obsidian’s files explorer. As it says “even if Obsidian can’t open them natively”.

2 Likes

I tried with a xml file, but forgot i had a plugin able to open that xml for me.:sweat_smile:

It’s a workaround, but with that enabled and the Open With plugin installed, you can open and edit other file types from inside Obsidian by right-clicking the file name in the Explorer and selecting an appropriate application from the popup menu.

cc: @Jopp

I’m not sure that the Open With plugin adds a lot, except maybe a bit of choice over default apps. I used the txt as md plugin from the time it came out, but non-md plaintext files are still second class citizens in Obsidian even if they can be opened and edited.

Before I stopped routinely using Obsidian, I’d defaulted to just opening these files in other apps because there was insufficient gain from opening them in Obsidian. Then I defaulted to my OS file explorers because they were so much more powerful than Obsidian’s.

The workarounds are ok if most of what you do is with .md files. If that’s not the case, they’re not enough. When related plugins come out, I try to check whether they have been able to access any of the pure md features, but thus far they never have. I suspect that heavy users of other exxtensions have mostly drifted away.

I have the same feeling as the owner of this post, editing only markdown files in Obsidian is very limitating.

The thing is that for editing files (txt, csv, xml, html, dat) we can use the most popular text editor or IDE Visual Studio Code which is five years previous to Obsidian and use the same philosophy.

In a harsh way we could say that Obsidian.md is a fork of VSCode only for editing and rendering markdown. And why?

  1. VSCode and Obsidian are both web apps running with the framework electron JS (chromium web dev tools from Google).
  2. Both programs are modulars, that means you can build on top and add open-source extensions (or plugins) created by the community.

And the differences are that:

  • VSCode is developed as an open-source project (with MicroSoft trackers in the MS installer) and Obsidian is a closed-source development in-house.
  • VSCode is thinked for developers in general with debug-run and extensions for coding (libraries, compilers, programming languages, etc). And Obsidian is for note takers with graph view, canvas and [[links]] between notes to edit only markdown files.

What I want?
a. Use Obsidian inside Visual Studio Code with an extra plugin.
b. Expand the use of Obsidian to edit any file as a text editor
c. Open source Obsidian for porting to other platforms

To finish, there are some open-source note taking apps or PKMS (Personal Knowledge Management Systems) for managing content that permit to edit any file:

2 Likes

There is also this plugin: GitHub - lukasbach/obsidian-code-files: Plugin for ObsidianMD to show and edit code files along other notes.
That bundles a monaco editor inside obs.
Its main caveat is that it requires external (online) dependencies, I literally just installed it but I’ll look into how to bundle the deps to avoid that

4 Likes

That seems to be needing to load the editor from a remote host hosted by the developer, which is a big no for privacy conscious users.

Yea it also doesn’t work on mobile sadly.
Mine does though!