I spent last week working in train cars, coffee shops, and libraries. I do mostly script data analysis with RStudio so my multi-display anlysis workflow down to a 13" laptop was a little
Control + Shift + 6
By far the biggest pane of working on a small screen is plotting. Trying to inspect even midly complex plots on 1/4 of of 13" is a bad time. This shortcut was clutch and wins a blue ribbon from me for best overall.
Repeating the same command shrinks the zoomed plot back to its prior size when you’re done.
Being able to navitage RStudio with less mouse helps productivity in general, but I didn’t have a mouse, I think it become even more valuable. These are the my big 3, that I use to relocate my cursor and keep typing away.
Control + 2
Moving the active cursor to the Console was good for testing a line of code or calling View
on a data frame.
Control + 1
Of course you eventualy have to move back. Remembering “one, two” pattern for back and forth was helpful.
Option + Shift + T
This one was harder for me to remember becasue it wasn’t in the Control + # pattern. But I use the git
CLI a lot, so I needed to learn it.
Control + Shift + 0
I found this most useful after I’d hit the wrong Zoom shortcut by mistake, it was effectivly my IDE reset switch.
Control + Option + l/r arrows
This very useful for switching back and forth between R scripts and View()
windows.
Now that I’m back to my multi-display setup, I’m still using all of these shortcuts. It did require a bit of conscious effort at the begining to fall back to my instinct and reach to the trackpad. But in the long run I think forcing myself to learn then was worth it.
These are just a small subset of all the shortcuts that are avaiable in RStudio. You can see all of them for yourself with the keyboard shortcut Option + Shift + K.
The screen screen recordings in this post are made with [KeyCastr] (https://github.com/keycastr/keycastr/blob/master/README.md)