Keyboard Shortcuts For R
Keyboard Shortcuts For R
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
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
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
Knitr)
Insert code section
Run current line/selection
Run current line/selection
(retain cursor position)
Re-run previous region
Run current document
Run from document
beginning to current line
Run from current line to
document end
Run the current function
definition
Run the current code section
Run previous Sweave/Rmd
code
Run the current Sweave/Rmd
chunk
Run the next Sweave/Rmd
chunk
Source a file
Source the current document
Source the current document
(with echo)
Fold Selected
Unfold Selected
Fold All
Unfold All
Go to line
Jump to
Switch to tab
Previous tab
Next tab
First tab
Last tab
Navigate back
Navigate forward
Extract function from
selection
Extract variable from
selection
Reindent lines
Ctrl+Shift+R
Ctrl+Enter
Command+Shift+R
Command+Enter
Alt+Enter
Option+Enter
Ctrl+Shift+P
Ctrl+Alt+R
Command+Shift+P
Command+Option+R
Ctrl+Alt+B
Command+Option+B
Ctrl+Alt+E
Command+Option+E
Ctrl+Alt+F
Command+Option+F
Ctrl+Alt+T
Command+Option+T
Ctrl+Alt+P
Command+Option+P
Ctrl+Alt+C
Command+Option+C
Ctrl+Alt+N
Command+Option+N
Ctrl+Shift+O
Ctrl+Shift+S
Command+Shift+O
Command+Shift+S
Ctrl+Shift+Enter
Command+Shift+Enter
Alt+L
Shift+Alt+L
Alt+O
Shift+Alt+O
Shift+Alt+G
Shift+Alt+J
Ctrl+Shift+.
Ctrl+F11
Ctrl+F12
Ctrl+Shift+F11
Ctrl+Shift+F12
Ctrl+F9
Ctrl+F10
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
Ctrl+Alt+X
Command+Option+X
Ctrl+Alt+V
Command+Option+V
Ctrl+I
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
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
Windows & Linux
Move focus to Source Editor Ctrl+1
Mac
Ctrl+1
Ctrl+2
Ctrl+3
Ctrl+4
Ctrl+5
Ctrl+6
Ctrl+7
Ctrl+8
Ctrl+9
Ctrl+0
Ctrl+F8
Ctrl+2
Ctrl+3
Ctrl+4
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)
Stage/Unstage and move to
next (Git)
Mac
Ctrl+Option+D
Ctrl+Option+M
Ctrl+Up/Down
Spacebar
Enter
Enter
Session
Description
Windows & Linux
Quit Session (desktop only) Ctrl+Q
Restart R Session
Ctrl+Shift+F10
Mac
Command+Q
Command+Shift+F10