Rstudio starts to codefold markdown

[This article was first published on socialdatablog » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Rstudio is a great tool for working with R and R scripts. And Markdown is a great way to write even complex, reproducible documents in plain text. So they make a great combination. BUT:

before when writing markdown in rstudio, you had to write “—-” after your headings to get it to codefold markdown headings, thusly:

#my first-level heading ———-

## my second-level heading ———-

and AFAIK it didn’t understand the difference between different heading levels.

And now, all of a sudden, it just works! I am on version 0.98.243. So you don’t have to type —– after each heading, and you can press Alt L to fold a second-level heading and it will close all the text below it down to the next second or first-level heading.

All we need now is a keystroke to open or close everything up to a given level, and to move folded chunks around. I would *so* like to not keep using Microsoft Word for outlining; it gives me heartburn every time I have to admit that it is *still* the best document outliner around.

To leave a comment for the author, please follow the link and comment on their blog: socialdatablog » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)