Skip to main content

RStudio shortcuts

Your answer helps keep this page right.

Do these shortcuts work for you?

In the Editor section, Run Line/Selection runs the current line or the selection, and Run Entire Document runs the whole script. Move to Console and Move to Source move the cursor between the console and the editor.

Start with these

  • Run Line/Selection
  • Run Entire Document
  • Comment/Uncomment
  • Move to Console
  • Go to File/Function
  • Knit Document

Tips for RStudio

  • Interrupt Command Esc stops the command that is running.
  • Help for Function F1 opens the help for the function at the cursor.
  • Command History Ctrl↑ brings back earlier commands in the console.
Jump to section

Console4

ActionShortcut
Move to Console
Clear Console
Command History
Interrupt Command

Editor10

ActionShortcut
Run Line/Selection
Run Entire Document
Comment/Uncomment
Find
Insert <- Operator
Insert <- Operator
New Document
Save
Close Document
Reindent

Debug4

ActionShortcut
Toggle Breakpoint
Step Over
Continue
Stop Debugging

Build3

ActionShortcut
Build Package
Knit Document
Restart R Session
Report a problem

GitHub is public. Email is private.

Frequently Asked Questions

How many keyboard shortcuts does RStudio have on Windows?

RStudio has 27 keyboard shortcuts on Windows, organized into 5 sections: Console, Editor, Navigation, Debug, and more. This page lists all of them with searchable, organized shortcut tables.

Which RStudio shortcuts should I learn first?

Start with Run Line/Selection (Ctrl+Enter), Run Entire Document (Ctrl+Alt+R), Comment/Uncomment (Ctrl+Shift+C), Move to Console (Ctrl+2), Go to File/Function (Ctrl+.), Knit Document (Ctrl+Shift+K). The sections on this page list the rest.

Can I download RStudio shortcuts as a PDF?

Yes. Click the download button at the top of this page to generate a printable PDF cheat sheet with all 27 RStudio shortcuts. The PDF includes organized sections, keycap-style key labels, and space for your own notes.

Where is the official RStudio keyboard shortcuts documentation?

The official RStudio keyboard shortcuts documentation is available on their website. Every shortcut on this page is sourced from and verified against the official documentation to ensure accuracy.

Do these RStudio shortcuts work on all Windows keyboards?

Yes. These shortcuts work on standard Windows keyboards. The modifier keys are Ctrl, Alt, Shift, and the Windows key (⊞). Some laptop keyboards may have compact layouts where certain keys require an Fn modifier to access.

Maintained by