origami.el icon indicating copy to clipboard operation
origami.el copied to clipboard

Folding for knitr noweb chunks

Open drgibbon opened this issue 9 years ago • 1 comments

Not sure how complicated this would be, but I use LaTeX with embedded R code knitr chunks (in an R noweb file, *.Rnw), and it would be great to be able to fold up the R code blocks. Some of mine get quite long and it becomes a little unwieldy. A code block typically looks like;

<<blockname, arg1=TRUE, arg2=FALSE>>
# code here
do(something)
@

So the filetype is *.Rnw, and the delimiters are; Open: <<SOME TEXT>> Close: @

Is it possible to make folding logic for that?

drgibbon avatar Mar 01 '16 07:03 drgibbon

Would like to second this, would be very useful to have this functionality. Personally would make my life a lot easier. Had a quick look at origami-parsers.el but not sure really where to start to implement this. Although my knowledge with lisp and regular expressions is limited I would be willing to try.

marcbrouard avatar Sep 14 '16 08:09 marcbrouard