Shortcut to display only the Source and Console panes

When working on RStudio, it is frequently helpful to switch between the following three pane arrangements:

  1. Zoom Source – To focus on developing codes
  2. Display both Source and Console panes, and no other panes – To run code segments in the Source pane, step-by-step, and review the results in the Console pane
  3. Zoom Console – To review more extended outputs in a maximized Console pane

There are already keyboard shortcuts for the items 1 and 3 above. However, unfortunately, there is currently no shortcut available for the item 2 above; that is, a shortcut that exclusively shows the Source and Console panes (and no other pane). I have submitted a feature request to ask for such a shortcut, but in the meantime, the following work-around may be helpful.

Start off with the default pane structure where all the four panes are shown in their standard places. Then, manually hide the two panes on the right, that are, the "Environment/Git/..." pane and the "Plot/File/..." pane. With that, only the Source and the Console panes will be shown. Now keep pressing the keyboard shortcut CTRL-SHIFT-1, which is the shortcut for zooming the Source. You will notice that that the pane structure keeps alternating between an arrangement that shows only the Source pane and another one that shows both the Source and the Console panes. Similarly, if you keep pressing CTRL-SHIFT-2 multiple times, you will see that the pane structure alternates between Console only, and both Source and Console together. These two shortcuts taken together lead to the behavior we were looking after.

I hope you find this work-around useful. Feel free to also check the following tip on creating single-button keyboard shortcuts in RStudio, which can be nicely mixed with the above work-around.

1 Like

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