Rstudio Editor: Can no longer collapse function calls

Hi, in previous versions of Rstudio I could collapse function calls from opening to closing bracket, like bs4SidebarMenu in the screenshot, by calling F1

Now F1 calls function help. I could not find the previous command I used for F1 in Keyboard Shortcuts.

So how do I collapse everything from opening bracket to closing bracket now?


Can be deleted, my error. The hotkey was ctrl+F1 and it was newly mapped to VCS pane, therefore not working.

But, in case you're wondering what the out-of-the-box shortcuts would be for (un)folding..


And under Help you'll find a complete overview of Keyboard shortcuts (Alt+Shift+K).

Hi thanks for that, but these do not seem to do the same, instead they fold at a higher level, not individual brackets. However, both functionalities are just called "Fold" in the keyboard editor, so I did not realize that the second does something different (i.e. the thing I was look for).

Would be good to have different names for that in the keyboard editor to avoid further confusion :).

Yeah, I would be confused as well: I wasn't even aware of all these nitty gritty details of the fold options.. but then again, RStudio is so powerful I shouldn't be surprised at all :laughing:

1 Like

Yeah amazing :slight_smile: I find that shortcut super helpful for organizing code, especially with long nested shiny UI brackets :hot_face:.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.