Is there a way to add code folding arrows next to round brackets in RStudio? For example, in the picture below a
can collapse using the little arrow next to it, but no arrow shows up to collapse b
. Is it possible to make those round brackets collapse without having to select the region that needs to be collapsed?
I'm especially interested in collapsing sub-brackets, which is already possible with the braced (as shown in c
and d
).
I have found that I can fold anything by selecting it and typing ALT+L
, however, that can be rather tedious when needing to fold in a document with many brackets. Therefore, I am looking for an option to make the ()
brackets collapsable like the {}
brackets.