RStudio shortcuts
- 27 shortcuts
- 5 sections
- Development
- Also on: Windows
- Verified against official docs
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 ⌘↑ brings back earlier commands in the console.
Jump to section
Console4
| Action | Shortcut |
|---|---|
| Move to Console | |
| Clear Console | |
| Command History | |
| Interrupt Command |
Editor10
| Action | Shortcut |
|---|---|
| Run Line/Selection | |
| Run Entire Document | |
| Comment/Uncomment | |
| Find | |
| Insert <- Operator | |
| Insert <- Operator | |
| New Document | |
| Save | |
| Close Document | |
| Reindent |
Debug4
| Action | Shortcut |
|---|---|
| Toggle Breakpoint | |
| Step Over | |
| Continue | |
| Stop Debugging |
Build3
| Action | Shortcut |
|---|---|
| Build Package | |
| Knit Document | |
| Restart R Session |
Report a problem
GitHub is public. Email is private.
Related resources
More Development shortcuts
Explore more macOS apps
Frequently Asked Questions
How many keyboard shortcuts does RStudio have on macOS?
RStudio has 27 keyboard shortcuts on macOS, 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 (⌘↩), Run Entire Document (⌥⌘R), Comment/Uncomment (⇧⌘C), Move to Console (⌃2), Go to File/Function (⌃.), Knit Document (⇧⌘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 Mac keyboards?
Yes. These shortcuts work on all Mac keyboards, including MacBook built-in keyboards and external Apple keyboards. The modifier keys are Command (⌘), Option (⌥), Control (⌃), and Shift (⇧). On keyboards without a Function row, some F-key shortcuts may require holding the Fn key.
Maintained by Vladik Didyk
Access RStudio shortcuts from your menu bar
KeyShortcut detects the active app and shows its shortcuts instantly. Switch it on in Settings. No memorization needed.
