Some shortcuts may differ if non-default keybindings are selected (e.g., Emacs, Vim, or Sublime Text).
Command Palette
A command palette is a software affordance that gives instant, searchable access to all of a program’s commands. Command palettes have become a fixture of modern IDEs, and with good reason. They improve:
Keyboard accessibility; even commands that do not have keyboard shortcuts are easily invoked from the palette.
Speed; it is often much faster to invoke a command from the palette with a few quick keystrokes than to reach for the mouse or drill into a menu.
Discoverability; since the palette lists all the commands, it can be browsed to find a command for a task by name without trying to figure out which menu or toolbar might contain it.
All shortcuts can be accessed via the Command Palette:
Description
Windows & Linux
Mac
Show Command Palette
Ctrl+Shift+P, Ctrl+Alt+Shift+P (Firefox)
Shift+Command+P
It’s also available on the Tools menu (Tools -> Show Command Palette).
Accessibility
Description
Windows & Linux
Mac
Toggle Screen Reader Support
Alt+Shift+/
Ctrl+Option+/
Speak Text Editor Location
Alt+Shift+1
Ctrl+Option+1
Focus Console Output
Ctrl+` or Alt+Shift+2
Ctrl+` or Ctrl+Option+2
Toggle Tab Key Always Moves Focus
Alt+Shift+[
Ctrl+Option+[
Focus Next Pane
F6
F6
Focus Previous Pane
Shift+F6
Shift+F6
Focus Main Toolbar
Alt+Shift+Y
Ctrl+Option+Y
Console
Description
Windows & Linux
Mac
Move cursor to Console
Ctrl+2
Ctrl+2
Clear console
Ctrl+L
Ctrl+L
Move cursor to beginning of line
Home
Command+Left
Move cursor to end of line
End
Command+Right
Navigate command history
Up/Down
Up/Down
Popup command history
Ctrl+Up
Command+Up
Interrupt currently executing command
Esc
Esc
Change working directory
Ctrl+Shift+H
Ctrl+Shift+H
Source
Description
Windows & Linux
Mac
Go to File/Function
Ctrl+. [period]
Ctrl+. [period]
Move cursor to Source Editor
Ctrl+1
Ctrl+1
Toggle document outline
Ctrl+Shift+O
Shift+Command+O
Toggle visual markdown editor
Ctrl+Shift+F4
Ctrl+Shift+F4
New document (except on Chrome/Windows)
Ctrl+Shift+N
Shift+Command+N
New document (Chrome only)
Ctrl+Alt+Shift+N
Option+Shift+Command+N
Open document
Ctrl+O
Command+O
Save active document
Ctrl+S
Command+S
Save all documents
Ctrl+Alt+S
Command+Option+S
Close active document (except on Chrome)
Ctrl+W
Command+W
Close active document (Chrome only)
Ctrl+Alt+W
Option+Command+W
Close all open documents
Ctrl+Shift+W
Shift+Command+W
Close other documents
Ctrl+Shift+Alt+W
Option+Shift+Command+W
Preview HTML (Markdown and HTML)
Ctrl+Shift+K
Shift+Command+K
Knit Document (knitr)
Ctrl+Shift+K
Shift+Command+K
Compile Notebook
Ctrl+Shift+K
Shift+Command+K
Compile PDF (TeX and Sweave)
Ctrl+Shift+K
Shift+Command+K
Insert chunk (Sweave and Knitr)
Ctrl+Alt+I
Option+Command+I
Insert code section
Ctrl+Shift+R
Shift+Command+R or Ctrl+Shift+R
Run current line/selection
Ctrl+Enter
Command+Return
Run current line/selection (retain cursor position)