6 Life-Altering RStudio Keyboard Shortcuts

Written by Matt Dancho on January 5, 2021

This article is part of a R-Tips Weekly, a weekly video tutorial that shows you step-by-step how to do common R coding tasks.

The RStudio IDE is amazing. You can enhance your R productivity even more with these simple keyboard shortcuts.

Here are the links to get set up. 👇

6 Keyboard Shortcuts (that will change your life)

Let’s speed up common activities with these 6 super-useful keyboard shortcuts.

(Click image to play tutorial)

1: Commenting & Uncommenting Code
[Ctrl + Shift + C]

I use this all the time to turn text into commented text. Works with multiple lines too.

Go from this...

To this...

2: Add the Pipe %>%
[Ctrl + Shift + M]

My students absolutely love this. You can easily add the Pipe %>% in any spot you’d like! Perfect for data wrangling with dplyr.

3: Insert The Assignment Operator
[Alt + -]

My code has tons of assignment operators. This is a simple, time-saver that will make you more productive in building functions and assigning variables values.

4: Cursor-Select Multiple Lines
[Ctrl + Alt + Up/Down/Click]

This is a recent addition to my portfolio of must-know keyboard shortcuts. Using Multi-Cursor Select has now become a go-to for editing R code.

Multi-Line Select

...And edit!

5: Find in Files
[Ctrl + Shift + F]

THIS IS A SUPER POWER. Seriously. Learn to use this one right now!

Find in Files

Found every instance of ggplot by file!

6: Keyboard Shortcut Cheat Sheet
[Alt + Shift + K]

More shortcuts!!! Run this to get a Keyboard Shortcut Cheat Sheet.

Your coworkers will be jealous of your productivity. 👇

But if you really want to improve your productivity…

Here’s how to master R. 👇

What happens after you learn R for Business.

The look on your boss’s face after you’ve launched your first Shiny App. 👇

This is career acceleration.


  1. Get the Code

  2. Check out the R-Tips Setup Video.

Once you take these actions, you’ll be set up to receive R-Tips with Code every week. =)

👇 Top R-Tips Tutorials you might like: