RMarkdown compatibility (let obsidian handle .rmd files just as .md files)

Things I have tried

  • convert all .rmd in my vimwiki index and diary folder to .md by simply renaming them all
  • searching desperately many hours for obsidian .rmd integration, with a big tear in my eyes.

What I’m trying to do

Let Obsidian simply handle all markdown files as .rmd.


Dear community. Desperate vimmer here. I am using RMarkdown in my vimwikis. My vimwiki is my go to, I have programmed several things for using it that make my life easier. Yesterday, I finally wanted to see a graph view of my (very many notes) and it is nice feature to use sometimes. But, I first need to convert all my markdown files just so that Obsidian can handle them. Why is it not possible? Is there a certain option in the configurations that I could tweak so that I can open .rmd files just as .md, and also create new .rmd notes instead of .md in obsidian).

To me it seems that it should be very simple, at least it is in vimwiki config. But Obsidian is still a big mystery to me. So it would be nice if a obsidian config expert could give some practical opinions?

I fear that some users might be angry against me and ask questions like:
„Why use .rmd?“

  • … Because I am a student and need to handle a lot of R code and also reports, that I can easily calculate and compile with .rmd as basic note file type.
  • But also, all my .rmd files that do not have R code or are reports, I simply handle just as I would handle markdown files.
  • Having .rmd just gives me a simple extra feature and opportunities.

Other question:

„but .md is need for … compiling them to html or pdf.“

  • And exactly this I am doing all the time with .rmd.

I am a very new user here and I finally after quite some time to go public with my request. Please fellow users could you please help me, I would be much grateful for any help.

With kind regards from Germany,

Sebi

P.S.:

I have also read the following posts:

If anyone could help out with the feature of opening obsidian posts from-within vim, this would be very great as well.
Because the evil mode in obsidian, with just a basic .obsidian.vimrc does not let me use the same pluginst which I am using in my neovim configuration.

Please, if anyone is out there, a fellow vimmer (I am using archlinux btw), help would be very much appreciated :cry:

I don’t know what are .rmd files and how are they different from .md files. But if you only need .rmd files to be editable in Obsidian just like .md files, you can try the “txt as md” plugin in the community plugins list, and edit a slight bit of code so it works for .rmd files as well.

Notice that rmd files will not show on the graph view tho.

After downloading & installing the plugin, go to “your vault/.obsidian/plugins/txt-as-md-obsidian/”, open main.js, and make this line here.


The highlighted line is newly made.

After that, save the file, and you will now be able to directly edit .rmd files.

1 Like

Dear Obbyroll,

thank you a lot for your quick response.
I want .rmd files to be editable, and most importantly, if I create a new link, I will want the file to be linking to a .rmd file, instead of .md. The „.rmd“ files are mostly just the same as .md

And exactly this feature of the graph view lets me want to use Obsidian. So I want to know how possibly I can just tell Obsidian to ignore the „r“ in the „.rmd“.

I will now directly try out the suggested plugin.

If there are any other ideas, I would be very grateful.

With kind regards,
Sebi

1 Like

I’m afraid that plugin is no more than letting you edit these files though…

I know nothing about JavaScript and I think that plugin is actually used by the community to create markdown-but-not-on-graph notes sometimes.

I think that’s all I can help sadly… Good luck finding other solutions!

Thanks again Obbyroll,

As said, the graph view is one major reason for me to use Obsidian in the first place.
I just discovered this thread:

And I at least see that I am totally not the only one……
I do hope so much for the possibility to e.g. set a file format (such as .rmd), and then let obsidian use it the same way as it would handle markdown.

E.g., when creating a link [[newfile]] or [newfile](newfile], it should point to a .rmd file newfile.

?

I already fear that once the moderators will discover this thread, simply be closing it. But I am still sure that I am not the only desperate Rmd user.

As I am writing my thesis, and having many thousands of notes, that I was at least after renaming the rmds to md convert able to inspect, it seems that I have to say goodbye to Obsidian already. But at least I hope someone still has a solution. @Dor @hqgu has anything changed yet in the range of possibilities?
Otherwise, sorry for the so-called „necrobumping“ … but I can not regret it as the issue has not yet been solved.

With kind regards,

Sebi

Not as far as I know. It’s my biggest Obsidian frustration by some distance.

3 Likes

I use R markdown files a bit at work and while my workflow doesn’t need to view Rmd files in Obsidian I can see how it might be useful to others. I don’t see any real over-arching issue why Rmd files couldn’t just be viewed the same as md files but there are few little issues (none of which are massive):

  • code blocks would not be formatted with R syntax unless ```{r} was interpreted as ```r but even then more complex code chunk headers would be a problem so perhaps just ```{r would be better
  • LaTeX commands would be shown as is

I certainly wouldn’t want to edit Rmd files in Obsidian, much preferring RStudio (for running) or Neovim for large-scale edits.

2 Likes

Since I mostly use Rmd, I also thought I wouldnt want to edit Rmd in Obsidian. But since I use vimwiki and have many links, and for knowledge management, Obsidian does seem to have some nice features.
It seems that I would have to continue with markdown only, and keep a seperate vimwiki only for coding.
Still, this is a quite uncomfortable solution. I thought the philosophy of Obsidian would be to store all notes in one place.

@WhiteNoise

note title .rmd< , so [[note title]] should always point to note title.rmd. If Obsidian could understand that there are different extensions with linking, it would be nice but that is not what I am asking for. Simply an option in Obsidians config saying “treat .rmd just like .md” - and I would be operating my obsidian purely on .rmd files (not to say all the compiled pdf and other stuff but I am talking for the main note structures written in obsidian).

Thanks for the suggestion, “user-customizable extention for the notes files” is exactly what I am asking for here as FR (=Feature Request I suppose?)

I am not talking about any .Rmd specific compatibility for R code, and @dknight212 reflects the reasons why I use neovim in such cases.
It still is handy for developing code to see where my test versions derived from etc., all traceable via graphview. And if I would run the code, I could simply open it with vim, compile or run script from command line.

exactly. That’s why I want to handle .rmd files. Only. No txt, .tex, or log files I would need to be visible. But most of all just all .rmd files, while .md being „nonexistent“. This way I could 100% use vimwiki and obsidian on parallel paths with the same notes - coding and writing alike. And it was the reason why I got here.

So maybe there could be built a .Rmd specific syntax highlighting plugin (handling visibility of code blocks), later on? And I think it would certainly be a possibility, for the future ahead. To me, I do not see it as an issue (yet).

I am not really getting why the arguments supporting user defined extension as weak. I also believe Obsidian would get more users just from this simple practical option. From what I have read before from the others I found it quite convincing already but this probably is very subjective depending on the stance and I am sadly not a developer myself. If I could, I would like to help out.

How to raise the FR priority? Collect better arguments? I have really tried to convince …

With kind regards,

Sebi

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.