Hotkeys and shortcuts for RStudio (MacOS)

(Total 134)

Ctrl + 2
Console
Move cursor to console
Ctrl + L
Console
Clean console
Command + Left
Console
Move cursor to beginning of line
Command + Right
Console
Move cursor to end of line
Up / Down
Console
Navigate command history
Command + Up
Console
Popup command history
Esc
Console
Interrupt currently executing command
Ctrl + Shift + H
Console
Change working directory
Ctrl + .
Source
Goto file/function
Ctrl + 1
Source
Move cursor to source editor
Command + Shift + N
Source
New document (except on chrome/windows)
Command + Option + Shift + N
Source
New document (Chrome only)
Command + O
Source
Open document
Command + S
Source
Save active document
Command + W
Source
Close active document (except on Chrome)
Command + Option + W
Source
Close active document (Chrome only)
Command + Shift + W
Source
Close all open documents
Command + Shift + K
Source
Preview HTML (markdown and HTML)
Command + Shift + K
Source
Compile notebook/compile PDF (TeX and Sweave)
Command + Option + I
Source
Insert chunk (Sweave and Knitr)
Command + Shift + R
Source
Insert code section
Command + Enter
Source
Run current line/selection
Option + Enter
Source
Run current line/selection (retain cursor position)
Command + Shift + P
Source
Re-run previous region
Command + Option + R
Source
Run current document
Command + Option + B
Source
Run from document beginning to current line
Command + Option + E
Source
Run from current line to document end
Command + Option + F
Source
Run from current line to document end
Command + Option + T
Source
Run the current code section
Command + Option + P
Source
Run previous sweave/Rmd code
Command + Option + C
Source
Run the current Sweave/Rmd chunk
Command + Option + N
Source
Run the next Sweave/Rmd chunk
Command + Shift + O
Source
Source a file
Command + Shift + S
Source
Source the current document
Command + Shift + Enter
Source
Source the current document (with echo)
Command + Option + L
Source
Fold selected
Command + Shift + Option + L
Source
Unfold selected
Commad + Option + O
Source
Fold all
Commad + Shift + Option + O
Source
Unfold all
Commad + Shift + Option + G
Source
Go to line
Commad + 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
Command + F9
Source
Navigate back
Command + F10
Source
Navigate forward
Command + Option + X
Source
Extract function from selection
Command + Option + V
Source
Extract variable from selection
Command + I
Source
Reindent lines
Command + Shift + C
Source
Comment/uncomment current line/selection
Command + Shift + /
Source
Reflow comment
Command + Shift + A
Source
Reformat selection
Command + Shift + Shift + P
Source
Show diagnostics
Option + Up/Down
Source
Move lines Up/Down
Command + Option + Up/Down
Source
Copy lines Up/Down
Ctrl + P
Source
Jump to matching Brace/Paren
Ctrl + Shift + E
Source
Expand to matching Brace/Paren
Command + Shift + Option + E
Source
Select to matching Brace/Paren
Ctrl + Option + Up
Source
Add cursor above current cursor
Command + Option + Down
Source
Add cursor beow current cursor
Ctrl + Option + Shift + Up
Source
Move active cursor up
Ctrl + Option + Shift + Down
Source
Move Active Cursor Down
Command + F
Source
Find and replace
Commad + G
Source
Find next
Commad + Shift + F3
Source
Find previous
Command + E
Source
Use selection for find
Command + Shift + J
Source
Replace and find
Command + Shift + F
Source
Find in files
F7
Source
Check spelling
Tab / Command + Space
Completions (Console and Source)
Attempt completion
Up / Down
Completions (Console and Source)
Navigate candidates
Enter / Tab / Right
Completions (Console and Source)
Accept selected candidate
Esc
Completions (Console and Source)
Dismiss completion popup
Command + 1
Views
Move focus to Source Editor
Command + 2
Views
Move focus to Console
Command + 3
Views
Move focus to Help
Command + 4
Views
Show History
Command + 5
Views
Show files
Command + 6
Views
Show plots
Command + 7
Views
Show packages
Command + 8
Views
Show environment
Command + 9
Views
Show git/svn
Command + 0
Views
Show build
Command + F8
Views
Sync editor & pdf preview
Option + Shift + K
Views
Reference
Command + Shift + B
Build
Build and reload
Command + Shift + L
Build
Load all (devtools)
Command + Shift + T
Build
Test package (desktop)
Command + Option + F7
Build
Test package (web)
Command + Shift + E
Build
Check package
Command + 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
Command + Option + F11
Plots
Previous plot
Command + Option + F12
Plots
Next plot
Ctrl + Option + D
Git / SVN
Diff active source document
Ctrl + Option + M
Git / SVN
Commit changes
Ctrl + Up/Down
Git / SVN
Scroll diff view
Spacebar
Git / SVN
Stage/unstage(Git)
Enter
Git / SVN
Stage/unstage and move to next (Git)
Command + Q
Session
Quit Session (desktop only)
Command + Shift + F10
Session
Restart R Session
Command + Z
Editing (Console and Source)
Undo
Command + Shift + Z
Editing (Console and Source)
Redo
Command + X
Editing (Console and Source)
Cut
Command + C
Editing (Console and Source)
Copy
Command + V
Editing (Console and Source)
Paste
Command + A
Editing (Console and Source)
Select all
Command + Left/Right
Editing (Console and Source)
Jump to word
Command + Home/End / Command + Up/Down
Editing (Console and Source)
Jump to start/end
Command + D
Editing (Console and Source)
Delete line
Shift + Arrow
Editing (Console and Source)
Select
Option + Shift + Left/Right
Editing (Console and Source)
Select word
Command + Shift + Left
Editing (Console and Source)
Select to line start
Command + Shift + RIght
Editing (Console and Source)
Select to line end
Shift + Page Up / Shift + Page down
Editing (Console and Source)
Select page up/down
Command + Shift + Home/End
Editing (Console and Source)
Select page start/end
Option + Backspace
Editing (Console and Source)
Delete word left
Tab
Editing (Console and Source)
Indent
Shift + Tab
Editing (Console and Source)
Outdent
Ctrl + U
Editing (Console and Source)
Yank line up to cursor
Ctrl + K
Editing (Console and Source)
Yank line after cursor
Ctrl + Y
Editing (Console and Source)
Insert currently yanked text
Option + -
Editing (Console and Source)
Insert assignment operator
Command + 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
Command + Option + U
Editing (Console and Source)
Find usages for symbol at cursor (C++)