Enabling R Markdown syntax highlighting in TextWrangler/BBEdit

1.4k Views Asked by At

I would like to enable syntax highlighting for R Markdown (.Rmd) highlighting in TextWrangler. I managed to get syntax highlighting for .R files using this R.plist file (direct link to file). R Markdown has similar highlighting, so I have that file as a starting point, as I cannot find a similar .plist file for .Rmd files.

The issue I am having is that in RMarkdown, the code is between a set of ``` (three backticks) and the text (which is what I'd like to demarcate as comments) are the remainder of the file.

I would like to tell TextWrangler to only highlight what it sees between a set of ``` - currently, it highlights the entire file (including my text sections).

I thought editing the values for keys

<key>Open Block Comments</key>
        <string></string>
<key>Close Block Comments</key>
        <string>```</string>

would be a workaround, but it doesn't seem to help.

Edit, here is the Rmd syntax:

here is some text that is whatever I want.

```
in here between the backticks is some code 
```
here is some more exposition

The code I'd like to highlight with R syntax is between backticks, whereas the text I'd like to display as a comment/without highlighting (whichever is easiest) is not demarcated.

0

There are 0 best solutions below