RStudio

RStudio Shortcuts

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

Source: Official documentation · Updated 2026-06

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
Run current chunk
CtrlShiftEnter
Source the file
CtrlShiftS
Source with echo
CtrlShiftEnter
Restart R session
CtrlShiftF10
Insert pipe operator
CtrlShiftM
Insert assignment <-
Alt-

Editing

7 shortcuts
Undo
CtrlZ
Redo
CtrlShiftZ
Comment / uncomment lines
CtrlShiftC
Reindent lines
CtrlI
Reformat code
CtrlShiftA
Delete line
CtrlD
Code completion
Tab

Navigation

5 shortcuts
Go to file / function
Ctrl.
Go to line
ShiftAltG
Go to definition
F2
Switch to Source
Ctrl1
Switch to Console
Ctrl2

Find & Help

4 shortcuts
Find
CtrlF
Find in files
CtrlShiftF
Help for function
F1
Show keyboard shortcuts
AltShiftK

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.

Does this page include Windows and Mac shortcuts for RStudio?

Yes. Use the OS tabs to switch between Windows and macOS shortcuts. For example, Run current line / selection is Ctrl+Enter on Windows and ⌘Enter on macOS where available.

See also

No shortcuts match your search.