Is there anyway of using code folding in an RNW knitr file that contains R and latex code? In particular to be able to fold the R code chunks. I am using polymode so as this changes the mode as you navigate in and out of chunks, this interferes with standard solutions for code folding.
About all I can find for this particular situation is this question on stackoverflow, but it is now quite old. Is there any improvements on this?