This has been requested before: Handle (edit) other plain text file formats ( rmarkdown, tex, txt, code, etc )
The suggestion to use the txt-as-md plugin does not work too well: Interlinks between files don’t quite work, the graph does not work, etc.
The main argument made in that forum post is also valid for me, i.e.: Interop with other tools, like Dokuwiki, nvAlt, whatever
I can also add a few more reasons, like:
-
For me,
txt
as file extension makes more sense, as it describes the content. You can argue the file extension should only describe the format and not the content, but I disagree. -
If it is about the format: Even
md
is not really well defined. There are so many variations such that Obsidian markdown files might not fully work work in other tools and vice versa. So,md
is more like saying “Markdown-like”. This could also be heuristically detected based on multiple features like file extension but also content. -
You can argue as you want, in the end you can just leave it to the user. I don’t see why this must be restricted. Regarding technical reasons, see below. But this would be a separate discussion. I’m happy to help here if needed.
With my argument that the file extension is not so much about the format (at least for txt
) or that the format is not so well defined (md
), I see the support for no file extension as equal: Support for files without extensions
With this reasoning, I don’t think it makes sense to handle each file extension as different feature requests. It’s a single feature I want here: Configuring the current Markdown support to handle multiple file extensions.
So, my idea would be that the user can define a list of file extensions, which are all handled the same, as Markdown files are currently handled. E.g. for me it would be:
-
md
,markdown
etc -
txt
,text
- no extension
Note that the order can be relevant. E.g. it can define priority. And new notes would automatically use the first defined extension.
Technical problems and solutions:
-
File names must be unique (e.g. for links). When there are multiple files with same name but different extensions: Just use the first (given the extension order) and ignore the others. Maybe show a little warning somewhere. This solution is very simple but also very much good enough, so I don’t really see a problem.
-
A new Markdown note is created: Use the first extension from the list.
-
I don’t know about any other technical problem.