Automatically open Markdown files in "Best Alternative" view

I like the new feature to view Markdown files rendered in DEVONthink a lot.

However, I would really like to have my Markdown files be rendered automatically when I open them, i.e. reverse the actual behavior in which they are displayed as text files and one has to select a menu item / press a shortcut to switch to rendered view.

So, I would like a preference option to select which view option should be used by standard for Markdown files.

To illustrate my use case:

  • I do all my note taking in markdown.
  • For example, I make notes for an article I read or some steps I took to implement something technical.
  • All the relating information (the article, some pdfs, some web archives etc.) is saved in DEVONthink, too, so I use DEVONthink links in the markdown files a lot.
  • So far I had to compile the md-file into a pdf or html document that I then imported into DT to have a nicely formatted document with clickable links that open the relating information within DT.

–> the new markdown rendering functionality makes the compiling step obsolete what is great
–> with my requested functionality, every md file automatically would be a displayed as a nicely formatted document with embedded clickable links and if you would want to edit the file, you could just hit the shortcut for either opening the File in your favorite editor or for changing the view option…

I asked support for this feature, and they were open to it, but said that they would need more feedback from other users whether they also would like this option. Also, they were sceptical about adding it as a preference option in order not to blow up preferences too much, so I suggested a hidden preference option that could be activated through the terminal.

So, if you would also like a normal or hidden preference option to change the default view option for Markdown files, please comment in this thread!

Thanks,
J

-1 for the specific request

During testing of 2.6 I opposed making “best alternative” the default for Markdown – I also do all my note taking in Markdown and my needs are just the opposite of the OP. Both are equally valid positions; neither view should rule. So, I don’t mind a hidden preference for those who want the opposite – in fact I strongly believe that in any case in DEVONthink where there are alternative views (rendered vs. non-rendered) then users should be given optional preferences for setting the default view. This applies to Markdown, Formatted Notes, HTML, Web Archives, and Mail – why fix one default preference anomaly for Markdown and leave the other ones untouched?

For now – in any document preview where there is an alternate option-command-P will toggle the views

Similar to what korm said, during testing I was so opposed to having Markdown files rendered automatically that I believe I would quit using DEVONthink to edit .md documents before I would put up with this behavior. If you are editing a document and need to reference other materials in your database (the way I typically write), when I would switch back to the .md document I would not only have to switch back to edit mode, but I would also lose the focus in the document.

I’m not opposed to any hidden preference to make this an option, but I have no interest in seeing the default behavior changed from what it is now.

I know, but as it would be incovenient for you to switch back to text mode every time you switch between files, it is inconvenient for me right now :slight_smile:

I would like hidden preferences for all file types with alternative view modes, too.

I can understand that for your way of working it would be aweful to use rendered view as default but as I said my style of working is using DT mainly to view stuff (and for that it would be great to see the content rendered and the links clickable instead of having to switch to rendered mode every time) and if I want to edit the file, I press Cmd-Shift-O to open it in MacVim where I can easily reference other materials and keep focus in the document…

My request wasn’t about changing the default behavior, but providing users an option to select the view that best supports their personal use case. I am totally fine with text view being the default as long as I would be able to change it. I also really don’t mind wether I can select it as a toggle in the preferences or with a Terminal command…

Thanks for listening!

The DEVONthink developers were kind enough to already implement a hidden preference in 2.6.1. Thank you very much!

As this was not mentioned in the release notes or the “normal” forums (it has been in the beta forums), I thought I post it here…

To have all Markdown files be opened in rendered view, execute the following command in your terminal (use FALSE to change the behavior back to the standard):

defaults write com.devon-technologies.thinkpro2 RenderMarkdown -bool TRUE

LOVE IT!!!

Many thx for this hint. It makes my workflow so much smoother.

Q: Is there any way to manipulate the CSS style-sheet that is being used for the rendering in DTP?

TIA

The font comes from Preferences > Editing > Rich Text & Note Font.