Rstudio starts to codefold markdown

September 16, 2013
By

(This article was first published on socialdatablog » R, and kindly contributed to R-bloggers)

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 his blog: socialdatablog » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.