radian icon indicating copy to clipboard operation
radian copied to clipboard

support RMarkdown blocks

Open fredcallaway opened this issue 5 years ago • 3 comments

Hey there! I'm trying to set up an alternative to RStudio for editing RMarkdown files using Sublime Text and radian. I use a mixture of Python and R. I wonder if it would be possible to add a feature to detect rmd style blocks and use the appropriate interpreter? That is, if I paste in

```{python}
x = [1,2,3]
```

it should be equivalent to typing

~
x = [1,2,3]
[BACKSPACE]

Similarly, if you type

```{r}
x <- c(1,2,3)
```

it should just be equivalent to just

x <- c(1,2,3)

fredcallaway avatar Jun 27 '20 17:06 fredcallaway

Bump. I could probably implement this myself and making a pull request if you are open to it.

fredcallaway avatar Jul 09 '20 04:07 fredcallaway

I am not entirely sure if we should handle it in radian. It sounds like the duty of a text editor plugin.

randy3k avatar Jul 09 '20 04:07 randy3k

OK, well for me that plugin would be SendCode. I guess the natural place to do it would be in CodeSender. But I do think that the functionality (e.g. replacing ```{python} with ~ is more specific to radian than it is to the code sending mechanism. And perhaps someone might want to just paste an rmarkdown script into radian?

fredcallaway avatar Jul 09 '20 05:07 fredcallaway