Hotkeys and shortcuts for RStudio (Mac)

(Total 134)

Ctrl + 2
Views
Move focus to Console
Ctrl + L
Console
Clear console
⌘ Cmd +
Console
Move cursor to beginning of line
⌘ Cmd +
Console
Move cursor to end of line
↑  ↓
Completions (Console and Source)
Navigate candidates
⌘ Cmd +
Console
Popup command history
Esc
Completions (Console and Source)
Dismiss completion popup
Ctrl + ↑   Shift + H
Console
Change working directory
Ctrl + .
Source
Goto File/Function
Ctrl + 1
Views
Move focus to Source Editor
⌘ Cmd + ↑   Shift + N
Source
New document (except on Chrome/Windows)
⌘ Cmd + ↑   Shift + Alt + N
Source
New document (Chrome only)
⌘ Cmd + O
Source
Open document
⌘ Cmd + S
Source
Save active document
⌘ Cmd + W
Source
Close active document (except on Chrome)
⌘ Cmd + ⌥ Option + W
Source
Close active document (Chrome only)
⌘ Cmd + ↑   Shift + W
Source
Close all open documents
⌘ Cmd + ↑   Shift + K
Source
Compile PDF (TeX and Sweave)
⌘ Cmd + ⌥ Option + I
Source
Insert chunk (Sweave and Knitr)
⌘ Cmd + ↑   Shift + R
Source
Insert code section
⌘ Cmd + ⤶ Enter
Source
Run current line/selection
⌥ Option + ⤶ Enter
Source
Run current line/selection (retain cursor position)
⌘ Cmd + ↑   Shift + P
Source
Re-run previous region
⌘ Cmd + ⌥ Option + R
Source
Run current document
⌘ Cmd + ⌥ Option + B
Source
Run from document beginning to current line
⌘ Cmd + ⌥ Option + E
Source
Run from current line to document end
⌘ Cmd + ⌥ Option + F
Source
Run the current function definition
⌘ Cmd + ⌥ Option + T
Source
Run the current code section
⌘ Cmd + ⌥ Option + P
Source
Run previous Sweave/Rmd code
⌘ Cmd + ⌥ Option + C
Source
Run the current Sweave/Rmd chunk
⌘ Cmd + ⌥ Option + N
Source
Run the next Sweave/Rmd chunk
⌘ Cmd + ↑   Shift + O
Source
Source a file
⌘ Cmd + ↑   Shift + S
Source
Source the current document
⌘ Cmd + ↑   Shift + ⤶ Enter
Source
Source the current document (with echo)
⌘ Cmd + ⌥ Option + L
Source
Fold Selected
⌘ Cmd + ↑   Shift + ⌥ Option + L
Source
Unfold Selected
⌘ Cmd + ⌥ Option + O
Source
Fold All
⌘ Cmd + ↑   Shift + ⌥ Option + O
Source
Unfold All
⌘ Cmd + ↑   Shift + ⌥ Option + G
Source
Go to line
⌘ Cmd + ↑   Shift + ⌥ Option + J
Source
Jump to
Ctrl + ↑   Shift + .
Source
Switch to tab
Ctrl + F11
Source
Previous tab
Ctrl + F12
Source
Next tab
Ctrl + ↑   Shift + F11
Source
First tab
Ctrl + ↑   Shift + F12
Source
Last tab
⌘ Cmd + F9
Source
Navigate back
⌘ Cmd + F10
Source
Navigate forward
⌘ Cmd + ⌥ Option + X
Source
Extract function from selection
⌘ Cmd + ⌥ Option + V
Source
Extract variable from selection
⌘ Cmd + I
Source
Reindent lines
⌘ Cmd + ↑   Shift + C
Source
Comment/uncomment current line/selection
⌘ Cmd + ↑   Shift + /
Source
Reflow Comment
⌘ Cmd + ↑   Shift + A
Source
Reformat Selection
⌘ Cmd + ↑   Shift + Alt + P
Source
Show Diagnostics
Ctrl + T
Source
Transpose Letters
⌥ Option + ↑  ↓
Source
Move Lines Up/Down
⌘ Cmd + ⌥ Option + ↑  ↓
Source
Copy Lines Up/Down
Ctrl + P
Source
Jump to Matching Brace/Paren
Ctrl + ↑   Shift + E
Source
Expand to Matching Brace/Paren
Ctrl + ↑   Shift + Alt + E
Source
Select to Matching Brace/Paren
Ctrl + Alt +
Source
Add Cursor Above Current Cursor
Ctrl + Alt +
Source
Add Cursor Below Current Cursor
Ctrl + Alt + ↑   Shift +
Source
Move Active Cursor Up
Ctrl + Alt + ↑   Shift +
Source
Move Active Cursor Down
⌘ Cmd + F
Source
Find and Replace
⌘ Cmd + G
Source
Find Next
⌘ Cmd + ↑   Shift + G
Source
Find Previous
⌘ Cmd + E
Source
Use Selection for Find
⌘ Cmd + ↑   Shift + J
Source
Replace and Find
⌘ Cmd + ↑   Shift + F
Source
Find in Files
F7
Source
Check Spelling
⌘ Cmd + Z
Editing (Console and Source)
Undo
⌘ Cmd + ↑   Shift + Z
Editing (Console and Source)
Redo
⌘ Cmd + X
Editing (Console and Source)
Cut
⌘ Cmd + C
Editing (Console and Source)
Copy
⌘ Cmd + V
Editing (Console and Source)
Paste
⌘ Cmd + A
Editing (Console and Source)
Select All
⌥ Option + ←  →
Editing (Console and Source)
Jump to Word
⌘ Cmd + Home
Editing (Console and Source)
Jump to Start/End
⌘ Cmd + End
Editing (Console and Source)
Jump to Start/End
⌘ Cmd + ↑  ↓
Editing (Console and Source)
Jump to Start/End
⌘ Cmd + D
Editing (Console and Source)
Delete Line
↑   Shift + ← ↑ → ↓
Editing (Console and Source)
Select
⌥ Option + ↑   Shift + ←  →
Editing (Console and Source)
Select Word
⌘ Cmd + ↑   Shift +
Editing (Console and Source)
Select to Line Start
⌘ Cmd + ↑   Shift +
Editing (Console and Source)
Select to Line End
Shift + Page Up / Down
Editing (Console and Source)
Select Page Up/Down
⌘ Cmd + ↑   Shift + ↑  ↓
Editing (Console and Source)
Select to Start/End
⌥ Option + ⬅ Backspace
Editing (Console and Source)
Delete to Line Start
Ctrl + ⌥ Option + ⬅ Backspace
Editing (Console and Source)
Delete Word Left
⌥ Option + Del
Editing (Console and Source)
Delete Word Right
Ctrl + K
Editing (Console and Source)
Yank line after cursor
⭾ Tab
Completions (Console and Source)
Accept selected candidate
↑   Shift + ⭾ Tab
Editing (Console and Source)
Outdent
Ctrl + U
Editing (Console and Source)
Yank line up to cursor
Ctrl + Y
Editing (Console and Source)
Insert currently yanked text
⌥ Option + -
Editing (Console and Source)
Insert assignment operator
⌘ Cmd + ↑   Shift + M
Editing (Console and Source)
Insert pipe operator
F1
Editing (Console and Source)
Show help for function at cursor
F2
Editing (Console and Source)
Show source code for function at cursor
⌘ Cmd + ⌥ Option + U
Editing (Console and Source)
Find usages for symbol at cursor (C++)
⌘ Cmd + Space
Completions (Console and Source)
Attempt completion
⤶ Enter
Git / SVN
Stage/Unstage and move to next (Git)
Completions (Console and Source)
Accept selected candidate
Ctrl + 3
Views
Move focus to Help
Ctrl + 4
Views
Show History
Ctrl + 5
Views
Show Files
Ctrl + 6
Views
Show Plots
Ctrl + 7
Views
Show Packages
Ctrl + 8
Views
Show Environment
Ctrl + 9
Views
Show Git/SVN
Ctrl + 0
Views
Show Build
⌘ Cmd + F8
Views
Sync Editor & PDF Preview
⌥ Option + ↑   Shift + K
Views
Show Keyboard Shortcut Reference
⌘ Cmd + ↑   Shift + B
Build
Build and Reload
⌘ Cmd + ↑   Shift + L
Build
Load All (devtools)
⌘ Cmd + ↑   Shift + T
Build
Test Package (Desktop)
⌘ Cmd + Alt + F7
Build
Test Package (Web)
⌘ Cmd + ↑   Shift + E
Build
Check Package
⌘ Cmd + ↑   Shift + D
Build
Document Package
↑   Shift + F9
Debug
Toggle Breakpoint
F10
Debug
Execute Next Line
↑   Shift + F4
Debug
Step Into Function
↑   Shift + F6
Debug
Finish Function/Loop
↑   Shift + F5
Debug
Continue
↑   Shift + F8
Debug
Stop Debugging
⌘ Cmd + ⌥ Option + F11
Plots
Previous plot
⌘ Cmd + ⌥ Option + F12
Plots
Next plot
Ctrl + ⌥ Option + D
Git / SVN
Diff active source document
Ctrl + ⌥ Option + M
Git / SVN
Commit changes
Ctrl + ↑  ↓
Git / SVN
Scroll diff view
Space
Git / SVN
Stage/Unstage (Git)
⌘ Cmd + Q
Session
Quit Session (desktop only)
⌘ Cmd + ↑   Shift + F10
Session
Restart R Session