R Studio

Keyboard Shortcuts

Description Windows & Linux Mac
Show Keyboard Shortcut Reference Alt+Shift+K Option+Shift+K
Change working directory Ctrl+Shift+H Ctrl+Shift+H
Run current document(all) Ctrl+Alt+R Command+Option+R
Knit Document (knitr) Ctrl+Shift+K Command+Shift+K
Run current line/selection Ctrl+Enter Command+Enter
Run current line/selection (retain cursor position) Alt+Enter Option+Enter
Re-run previous region Ctrl+Shift+P Command+Shift+P
Run previous Sweave/Rmd code Ctrl+Alt+P Command+Option+P
Reindent lines Ctrl+I Command+I
Comment/uncomment current line/selection Ctrl+Shift+C Command+Shift+C
Find and Replace Ctrl+F Command+F
Find Next Win: F3, Linux: Ctrl+G Command+G
Find Previous Win: Shift+F3, Linux: Ctrl+Shift+G Command+Shift+G
Move focus to Source Editor Ctrl+1 Ctrl+1
Move focus to Console Ctrl+2 Ctrl+2
Move focus to Help Ctrl+3 Ctrl+3
Show History Ctrl+4 Ctrl+4
Show Files Ctrl+5 Ctrl+5
Show Plots Ctrl+6 Ctrl+6
Show Packages Ctrl+7 Ctrl+7
Show Environment Ctrl+8 Ctrl+8
Show Git/SVN Ctrl+9 Ctrl+9
Show Build Ctrl+0 Ctrl+0

Useful customizable shortcuts:

Clear workspace F5