Handle (edit) other plain text file formats ( rmarkdown, tex, txt, code, etc )

+1 for *.txt - view and edit.
I’d even be okay if they looked like plain-text files, and did not behave like markdown files, as long as I can see and edit them.

It could be a useful feature the ability to open and edit (in plain text mode) this kind of files, even other code oriented text file (like Jupyter or python files). Zettlr can handle rmarkdown and .tex, so probably is not very difficult to implement.

4 Likes

I like your idea. For statisticians, rmarkdown is a very essential type of flat file. If the obsidian team can allow the user to set the configuration file, it can be easy to recognize and handle other types of flat files.

4 Likes

Why this topic got no one else’s attention ? :joy:

2 Likes

I would like to add my support to incorporating Rmd files. This would be a big plus for my workflow.

5 Likes

I don’t know where this should be posted, but I’m curious about anyone’s thoughts regarding this.

This isnt to say that Obsidian should operate the .Rmd file as good as it would be operated in R, but it is still markdown, so I can see the case being made to at least have visibility in the app. Has this been talked about already?

7 Likes

Edited to make this a feature request as I think it’s appropriate and will garner more discussion that way. (Note that the #developers-api section is meant for discussions among Obsidian’s community developers, not the Obsidian devs themselves.)

I think recognizing all kinds of markdown file formats is a great idea as it maximizes between-app interoperability. Like you said, even if some specific features of e.g., R don’t work in Obsidian, we should at least be able to see and look at the details of such a file from within the vault.

I believe the issue is namespace collisions. There’s a design dilemma afoot. How should Obsidian deal with two files with the same name but different file formats in a [[link]]?

11 Likes

The full bells and whistles way would be to distinguish .Rmd files from .md files and make the appropriate interpretations. The Yugo way is to ignore differences: interpret [[link]] as a link in a .md file but not in a .Rmd file; interpret link as a link in a .Rmd file but not in a .md file.

2 Likes

I Really Really Need that For Writing My Thesis, Please Make That Possible :slight_smile:

This could function the same way as txt file

I don’t need the posibility to create new Rmd files or use of [] inside them, what I need is only a possiblity to read and write on existing files
(I have chapters of my thesis in Rmd files)

6 Likes

I am exactly like you, using dokuwiki extensively (and TheBrain as mindmapping soft).
Now that I discovered Obsidian I am considering using it as mindmapping and knowledge base solution.
And so I also had this idea to use it as “an amazing interface for writing and editing my wiki”. I tested and came accross same issue: md vs txt and own markup dokuwiki language vs what obsidian supports.
So +100 for this !
will follow the progress

4 Likes

From Obsidian Release v0.10.10 we can open files of any type using quick switcher.
Please, show text based files (.txt, .html, .ahk, .py, .m and other code, …) also in global search (perhaps as option). I Assume, it would be possible to filter them out by something like “path:.md”.
Should this be separate request?

2 Likes

I believe it is a mistake to restrict Obsidian files to those with the .md extension.

Markdown as a file format is defined as a subset of plain text. Plain text is an old idea, which predates any restrictions on file extension formats. Plain text files can have any extension, or none. .txt is popular. Markdown files are plain text files. It is fully correct to store Markdown files as .txt.

As Markdown is a subset of plain text, you cannot make assumptions about the file extension of Markdown files. .md, .txt, .markdown are all popular. README files (without an extension) are often in Markdown. Many times Markdown is used as the format for a plain text file stored in a database, not as a file with a specific extension.

I believe the best user experience for Obsidian is as has been suggested here, to provide a choice of file-extensions that the user wants Obsidian to recognise as Markdown.

E.g., brian23498324’s suggestion:

Treat the following extensions as .md files:
.txt, .taskpaper

7 Likes

Because there are other considerations when naming files, outside of Obsidian. I prefer .txt because Markdown is defined as a subset of plain text. .md is an unnecessary extension.

2 Likes

I prefer .txt because Markdown is defined as a subset of plain text. .md is an unnecessary extension. I think for ultra-long-term concerns, .txt is a better choice.

I don’t think Obsidian’s mission statement of “can be used on an existing folder of notes” should require me to change them in this way.

4 Likes

Agreed. Native editor support for .txt, and other file extensions in addition to .md would open a lot of doors for a lot of users.

3 Likes

It is not an unnecessary extension, and .txt and .md should not be treated the same. Markdown files should have the opinionated ruleset of markdown, including its syntax and validation within the editor, which can be enforced by detection of the .md extension. Text files on the other hand require none of that, and should be rendered purely as plain text without syntax highlighting or validation as Markdown has. While MD is plain text from a technical standpoint, it is not treated as such from an editor or UX standpoint.

4 Likes

A community plugin has been released that allows you to edit plain text files.

3 Likes

Completely agree. I want to know whether a file is .md or .txt . It’s very helpful for knowing which programs to use to work with them.
I changed my mind; reasons given below.

This is wonderfully useful; useful enough to be core.
It allows Obsidian commands to work with and in txt files. I don’t want markdown files masquerading as txt files, so I won’t be adding native markdown formatting (I’d convert if I wanted to do that), but applying Obsidian functionality to them gives Obsidian a much wider range of use.

2 Likes

Had a chance to think it through further. One big advantage of .txt is that those files can be loaded by word processors, and other programs, that have a far fuller range of tools and features than any markdown editor. No use to people who want to live in Obsidian, but potentially very valuable to people like me who use a range of programs to work with the files.

  • Most of my files are pure text with no formatting. So switching them all to .txt has no downsides but plenty of upsides.
  • Most of the others have markdown formatting simply to facilitate Obsidian’s functions. Since deathau’s plugin preserves those, there’s no downside to switching those too.
  • Most of what remains have a small amount of markdown to format text. That formatting works perfectly well in Obsidian with the plugin, but not in other markdown editors. So this leaves me with a functional question of whether I gain more from switching to gain access to a wider range of tools, or whether it is best to stay aware that these are markdown files. For the moment at least, I will keep them as they are.
  • The others either have much more text formatting or aree hardcore markdown (such as those with tables), so they will stay as they are.

What has surprised me is how few of my of my files will be kept as markdown.
Of course, new files are automatically markdown, unless they are created in another program and then saved into the Obsidian vault. That’s probably the way I’ll go because it will save me time.

It strikes me that an interesting and useful, for some people, option for the WYSIWYG/WYSIWYM editor would be if the 3 views (source, preview, WYSIWYG) could have a 4th (txt) added.

3 Likes

You are correct that there can be uses for the .md extension. I should have said, for my use case I find it unnecessary.

I want my notes to be a set of plain text files, with the extension .txt.

I believe .txt is the best extension choice for my notes. .txt is likely to outlast Markdown. .txt better expresses what my notes are: at core, they are a collection of plain-text files.

As Markdown syntax is perfectly readable in plain text editors (this is the point of Markdown), I don’t lose anything by using Markdown syntax in my notes, and gain much. This is an excellent property of Markdown – it can be treated as plain text!

When opening my notes in editors that have extra features for Markdown, I tell those editors to assume Markdown syntax for all notes in my archive. As Markdown is backwards-compatible with plain text, this doesn’t break when some of my notes aren’t using any Markdown syntax.

I would like to be able to tell Obsidian, “treat these .txt files the same as any other Obsidian note”.

The community plugin was very interesting, thank you. But I think it doesn’t allow me to link to .txt files without the extension, and view them in the Graph view. Using this extension feels like .txt files are second-class to the .md notes.

3 Likes