nteract / hydrogen

:atom: Run code interactively, inspect data, and plot. All the power of Jupyter kernels, inside your favorite text editor.
https://nteract.gitbooks.io/hydrogen/
MIT License
3.92k stars 334 forks source link

Support run All for .Rmd and .pmd #1165

Open HenrikEckermann opened 6 years ago

HenrikEckermann commented 6 years ago

Hi there,

I replaced Rstudio with Atom to work with .Rmd files (when I use R) and .pmd files when I use Python. Knitr and pweave in combination with pandoc offer all the functionality I had in Rstudio and Jupyter Notebooks and even more and that all in one editor. Using code snippets for quickly inserting chunks...It works all super great for scientific reporting and data analysis, which is what I do.

Pweave does not care if my python chunks are in this format:

```python print(hello') ```

or this

```{python} print('hello') ```

But when I keep using the format WITH the curly brackets, then all my colleagues can open my .rmd files in Rstudio and it works directly. They also could just change .pmd to .rmd and the python files works in Rstudio as well as soon as Rstudio will support Python better (this is currently in the making). So, this is perfect since nobody is forced to switch to either Atom or Rstudio or whatever...

Since we can use code snippets in Atom, it is no extra work to use the curly brackets there. I just type 'rr' and press 'tab' or 'enter' and I have a r code chunk with the cursor in the middle and with another 'tab' I can specify chunk options like echo = FALSE. When I type 'pp' insteat, I get a python code chunk. So this works even better than in Rstudio where you have to use 'cmd' + 'alt' +'i' to insert a new r chunk (and there is no shortcut to insert code chunks for other languages.

So, this is my current workflow and as I said: Can completely take over Rstudio for me already with Atom. One thing that is missing: When I shut down my computer and want to continue working on a large .rmd or .pmd file after a restart, then I have to run each single code cell because the 'Run all' command is not supported for these documents. So, that is one thing that is missing if I compare this setting with RStudio oder Jupyter but that is very useful and I would say even necessary if you want to work in Rmarkdown or pweave markdown.

If you could add support for that, this would be another great improvement of this already fantastic tool!

Thank you for this!

matthew-brett commented 4 years ago

Adding to this - I've now got Atom working as an excellent replacement for the Jupyter web app, using a combination of Jupytext and Hydrogen : https://gist.github.com/matthew-brett/4c5fa31f8ddd371655e9dc39fbfb8299

But - as the original poster said - the missing feature(s) are:

With these, I would really lack for nothing compared to either RStudio or the Jupyter web app, for my usual workflow.

I see this is a "good first issue". Can y'all give any pointers on how to get started?