› RStudio

RStudio Shortcuts

RStudio keyboard shortcuts for running R code, the console, source editor and project navigation.

Source: Official documentation · Dataset date 2026-06

23
Shortcuts
4
Categories

Cheat sheet guide

RStudio shortcuts worth learning first

This page collects 23 searchable RStudio keyboard shortcuts across 4 categories. Start with the shortcuts for Run code, Editing, Navigation, Find & Help, then print the cheat sheet once the important ones are worth keeping nearby.

  • Run current line / selectionCtrlEnter
  • UndoCtrlZ
  • Go to file / functionCtrl.
  • FindCtrlF
  • Run current chunkCtrlShiftEnter
  • Source the fileCtrlShiftS

Run code

7 shortcuts
Run current line / selection
CtrlEnter
Ctrl+Enter · Cmd+Enter
Run current chunk
CtrlShiftEnter
Ctrl+Shift+Enter · Cmd+Shift+Enter
Source the file
CtrlShiftS
Ctrl+Shift+S · Cmd+Shift+S
Source with echo
CtrlShiftEnter
Ctrl+Shift+Enter · Cmd+Shift+Enter
Restart R session
CtrlShiftF10
Ctrl+Shift+F10 · Cmd+Shift+F10
Insert pipe operator
CtrlShiftM
Ctrl+Shift+M · Cmd+Shift+M
Insert assignment <-
Alt-
Alt+- · Opt+-

Editing

7 shortcuts
Undo
CtrlZ
Ctrl+Z · Cmd+Z
Redo
CtrlShiftZ
Ctrl+Shift+Z · Cmd+Shift+Z
Comment / uncomment lines
CtrlShiftC
Ctrl+Shift+C · Cmd+Shift+C
Reindent lines
CtrlI
Ctrl+I · Cmd+I
Reformat code
CtrlShiftA
Ctrl+Shift+A · Cmd+Shift+A
Delete line
CtrlD
Ctrl+D · Cmd+D
Code completion
Tab
Tab

Navigation

5 shortcuts
Go to file / function
Ctrl.
Ctrl+. · Cmd+.
Go to line
ShiftAltG
Shift+Alt+G · Shift+Opt+G
Go to definition
F2
F2
Switch to Source
Ctrl1
Ctrl+1
Switch to Console
Ctrl2
Ctrl+2

Find & Help

4 shortcuts
Find
CtrlF
Ctrl+F · Cmd+F
Find in files
CtrlShiftF
Ctrl+Shift+F · Cmd+Shift+F
Help for function
F1
F1
Show keyboard shortcuts
AltShiftK
Alt+Shift+K · Opt+Shift+K

Frequently asked questions

What is the fastest way to find RStudio shortcuts on this page?

Use the search box or press /, then type an action such as run current line / selection.

Can I print this RStudio shortcut cheat sheet?

Yes. Use the Print / PDF button or your browser print command to save a compact cheat sheet.

Which operating systems are included for RStudio?

This reference includes shortcuts for Windows · macOS · Linux. Availability depends on the action and app version.

See also

Explore shortcuts by key

Key lookup

No shortcuts match your search.