Keyboard Shortcuts RStudio
Keyboard Shortcuts RStudio
Console
Description
Move cursor to Console
Clear console
Move cursor to beginning of
line
Move cursor to end of line
Navigate command history
Popup command history
Interrupt currently executing
command
Change working directory
Mac
Ctrl+2
Ctrl+L
Ctrl+2
Ctrl+L
Home
Command+Left
End
Up/Down
Ctrl+Up
Command+Right
Up/Down
Command+Up
Esc
Esc
Ctrl+Shift+H
Ctrl+Shift+H
Source
Description
Windows & Linux
Goto File/Function
Ctrl+.
Move cursor to Source Editor Ctrl+1
New document (except on
Ctrl+Shift+N
Chrome/Windows)
New document (Chrome
Ctrl+Alt+Shift+N
only)
Open document
Ctrl+O
Save active document
Ctrl+S
Close active document
Ctrl+W
(except on Chrome)
Close active document
Ctrl+Alt+W
(Chrome only)
Close all open documents
Ctrl+Shift+W
Preview HTML (Markdown
Ctrl+Shift+K
and HTML)
Knit Document (knitr)
Ctrl+Shift+K
Compile Notebook
Ctrl+Shift+K
Compile PDF (TeX and
Ctrl+Shift+K
Sweave)
Insert chunk (Sweave and
Ctrl+Alt+I
Knitr)
Insert code section
Ctrl+Shift+R
Run current line/selection
Ctrl+Enter
Mac
Ctrl+.
Ctrl+1
Command+Shift+N
Command+Shift+Alt+N
Command+O
Command+S
Command+W
Command+Option+W
Command+Shift+W
Command+Shift+K
Command+Shift+K
Command+Shift+K
Command+Shift+K
Command+Option+I
Command+Shift+R
Command+Enter
Option+Enter
Command+Shift+P
Command+Option+R
Command+Option+B
Command+Option+E
Command+Option+F
Command+Option+T
Command+Option+P
Command+Option+C
Command+Option+N
Command+Shift+O
Command+Shift+S
Command+Shift+Enter
Cmd+Option+L
Cmd+Shift+Option+L
Cmd+Option+O
Cmd+Shift+Option+O
Cmd+Shift+Option+G
Cmd+Shift+Option+J
Ctrl+Shift+.
Ctrl+F11
Ctrl+F12
Ctrl+Shift+F11
Ctrl+Shift+F12
Cmd+F9
Cmd+F10
Command+Option+X
Command+Option+V
Command+I
Comment/uncomment
current line/selection
Reflow Comment
Reformat Selection
Show Diagnostics
Transpose Letters
Move Lines Up/Down
Copy Lines Up/Down
Jump to Matching
Brace/Paren
Expand to Matching
Brace/Paren
Select to Matching
Brace/Paren
Add Cursor Above Current
Cursor
Add Cursor Below Current
Cursor
Move Active Cursor Up
Move Active Cursor Down
Find and Replace
Find Next
Find Previous
Use Selection for Find
Replace and Find
Find in Files
Check Spelling
Editing (Console and Source)
Description
Undo
Redo
Cut
Copy
Paste
Select All
Jump to Word
Jump to Start/End
Ctrl+Shift+C
Command+Shift+C
Ctrl+Shift+/
Ctrl+Shift+A
Ctrl+Shift+Alt+P
Alt+Up/Down
Shift+Alt+Up/Down
Command+Shift+/
Command+Shift+A
Command+Shift+Alt+P
Ctrl+T
Option+Up/Down
Command+Option+Up/Down
Ctrl+P
Ctrl+P
Ctrl+Shift+E
Ctrl+Shift+E
Ctrl+Shift+Alt+E
Ctrl+Shift+Alt+E
Ctrl+Alt+Up
Ctrl+Alt+Up
Ctrl+Alt+Down
Ctrl+Alt+Down
Ctrl+Alt+Shift+Up
Ctrl+Alt+Shift+Down
Ctrl+F
Win: F3, Linux: Ctrl+G
Win: Shift+F3, Linux:
Ctrl+Shift+G
Ctrl+F3
Ctrl+Shift+J
Ctrl+Shift+F
F7
Ctrl+Alt+Shift+Up
Ctrl+Alt+Shift+Down
Command+F
Command+G
Command+Shift+G
Command+E
Command+Shift+J
Command+Shift+F
F7
Mac
Command+Z
Command+Shift+Z
Command+X
Command+C
Command+V
Command+A
Option+Left/Right
Command+Home/End or
Command+Up/Down
Delete Line
Select
Select Word
Select to Line Start
Select to Line End
Select Page Up/Down
Select to Start/End
Delete Word Left
Delete Word Right
Delete to Line End
Delete to Line Start
Indent
Outdent
Yank line up to cursor
Yank line after cursor
Insert currently yanked text
Insert assignment operator
Insert pipe operator
Show help for function at
cursor
Show source code for
function at cursor
Find usages for symbol at
cursor (C++)
Ctrl+D
Shift+[Arrow]
Ctrl+Shift+Left/Right
Alt+Shift+Left
Alt+Shift+Right
Shift+PageUp/PageDown
Ctrl+Shift+Home/End or
Shift+Alt+Up/Down
Command+D
Shift+[Arrow]
Option+Shift+Left/Right
Command+Shift+Left
Command+Shift+Right
Shift+PageUp/Down
Command+Shift+Up/Down
Option+Backspace or
Ctrl+Option+Backspace
Option+Delete
Ctrl+K
Option+Backspace
Tab (at beginning of line)
Shift+Tab
Ctrl+U
Ctrl+K
Ctrl+Y
Option+Cmd+Shift+M
F1
F1
F2
F2
Ctrl+Alt+U
Cmd+Option+U
Ctrl+Backspace
Mac
Tab or Command+Space
Up/Down
Enter, Tab, or Right
Esc
Views
Description
Move focus to Source Editor
Move focus to Console
Move focus to Help
Show History
Mac
Ctrl+1
Ctrl+2
Ctrl+3
Ctrl+4
Show Files
Show Plots
Show Packages
Show Environment
Show Git/SVN
Show Build
Sync Editor & PDF Preview
Show Keyboard Shortcut
Reference
Ctrl+5
Ctrl+6
Ctrl+7
Ctrl+8
Ctrl+9
Ctrl+0
Ctrl+F8
Ctrl+5
Ctrl+6
Ctrl+7
Ctrl+8
Ctrl+9
Ctrl+0
Cmd+F8
Alt+Shift+K
Option+Shift+K
Build
Description
Build and Reload
Load All (devtools)
Test Package (Desktop)
Test Package (Web)
Check Package
Document Package
Mac
Cmd+Shift+B
Cmd+Shift+L
Cmd+Shift+T
Cmd+Alt+F7
Cmd+Shift+E
Cmd+Shift+D
Debug
Description
Toggle Breakpoint
Execute Next Line
Step Into Function
Finish Function/Loop
Continue
Stop Debugging
Mac
Shift+F9
F10
Shift+F4
Shift+F6
Shift+F5
Shift+F8
Mac
Command+Option+F11
Command+Option+F12
Plots
Description
Previous plot
Next plot
Git/SVN
Description
Diff active source document
Commit changes
Scroll diff view
Stage/Unstage (Git)
Mac
Ctrl+Option+D
Ctrl+Option+M
Ctrl+Up/Down
Spacebar
Enter
Session
Description
Quit Session (desktop only)
Restart R Session
Mac
Command+Q
Command+Shift+F10