Skip to content
RStudio icon

RStudio shortcuts for Mac

197 shortcuts · 14 categories

RStudio is an integrated development environment (IDE) for the R programming language that offers features such as code completion, debugging, and visualization tools. Download RStudio

Use these RStudio shortcuts from a pie menu

Access your favorite RStudio shortcuts instantly with Pie Menu. No more memorizing—just point and click.

Pie Menu with shortcuts
Hover a shortcut to add it to Pie Menu

Mac keyboard shortcuts for RStudio

Accessibility

  • Focus Console Output⌃ (control) + ⌥ (option) + 2 Add →
  • Focus Main Toolbar⌃ (control) + ⌥ (option) + y Add →
  • Speak Text Editor Location⌃ (control) + ⌥ (option) + ⇧ (shift) + b Add →
  • Toggle Tab Key Always Moves Focus⌃ (control) + ⌥ (option) + ⇧ (shift) + t Add →
  • Toggle Screen Reader Support⌃ (control) + ⌥ (option) + / Add →

Main Menu (Server)

  • Help Menu⌃ (control) + ⌥ (option) + h Add →
  • Tools Menu⌃ (control) + ⌥ (option) + l Add →
  • Profile Menu⌃ (control) + ⌥ (option) + o Add →
  • Debug Menu⌃ (control) + ⌥ (option) + u Add →
  • Build Menu⌃ (control) + ⌥ (option) + b Add →
  • Session Menu⌃ (control) + ⌥ (option) + ⇧ (shift) + s Add →
  • Plots Menu⌃ (control) + ⌥ (option) + p Add →
  • View Menu⌃ (control) + ⌥ (option) + v Add →
  • Code Menu⌃ (control) + ⌥ (option) + c Add →
  • Edit Menu⌃ (control) + ⌥ (option) + i Add →
  • File Menu⌃ (control) + ⌥ (option) + f Add →

Terminal

  • Next Terminal⌥ (option) + ⇧ (shift) + f12 Add →
  • Previous Terminal⌥ (option) + ⇧ (shift) + f11 Add →
  • Move Focus to Terminal⌥ (option) + ⇧ (shift) + t Add →
  • New Terminal⌥ (option) + ⇧ (shift) + r Add →

Session

  • Restart R Session⇧ (shift) + ⌘ (command) + f10 Add →
  • Quit Session (desktop only)⌘ (command) + q Add →

Git/SVN

  • Stage/Unstage and move to next (Git)↵ Add →
  • Stage/Unstage (Git)space Add →
  • Scroll diff view⌃ (control) + ↑ Add →
  • Commit changes⌃ (control) + ⌥ (option) + m Add →
  • Diff active source document⌃ (control) + ⌥ (option) + d Add →

Plots

  • Next plot⌥ (option) + ⌘ (command) + f12 Add →
  • Previous plot⌥ (option) + ⌘ (command) + f11 Add →

Debug

  • Stop Debugging⇧ (shift) + f8 Add →
  • Continue⇧ (shift) + f5 Add →
  • Finish Function/Loop⇧ (shift) + f6 Add →
  • Step Into Function⇧ (shift) + f4 Add →
  • Execute Next Linef10 Add →
  • Toggle Breakpoint⇧ (shift) + f9 Add →

Build

  • Document Package⇧ (shift) + ⌘ (command) + d Add →
  • Check Package⇧ (shift) + ⌘ (command) + e Add →
  • Test Package (Web)⌥ (option) + ⌘ (command) + f7 Add →
  • Test Package (Desktop)⇧ (shift) + ⌘ (command) + t Add →
  • Load All (devtools)⇧ (shift) + ⌘ (command) + l Add →
  • Build and Reload⇧ (shift) + ⌘ (command) + b Add →

Help

  • Show Command Palette⇧ (shift) + ⌘ (command) + p Add →
  • Next Help Topic⌥ (option) + ⇧ (shift) + f3 Add →
  • Previous Help Topic⌥ (option) + ⇧ (shift) + f2 Add →
  • Find in Help Topic⌘ (command) + f Add →
  • Search R Help⌃ (control) + ⌥ (option) + f1 Add →
  • Show Keyboard Shortcut Reference⌥ (option) + ⇧ (shift) + k Add →

Views

  • Project Options⇧ (shift) + ⌘ (command) + , Add →
  • Global Options⌘ (command) + , Add →
  • Sync Editor & PDF Preview⌘ (command) + f8 Add →
  • Zoom Tutorial⌃ (control) + ⇧ (shift) + f6 Add →
  • Show Find in Files Results⌃ (control) + f6 Add →
  • Zoom Connections⌃ (control) + ⇧ (shift) + f5 Add →
  • Show Connections⌃ (control) + f5 Add →
  • Zoom Build⌃ (control) + ⇧ (shift) + f2 Add →
  • Show Build⌃ (control) + f2 Add →
  • Zoom Git/SVN⌃ (control) + ⇧ (shift) + f1 Add →
  • Show Git/SVN⌃ (control) + f1 Add →
  • Zoom Viewer⌃ (control) + ⇧ (shift) + 9 Add →
  • Show Viewer⌃ (control) + 9 Add →
  • Zoom Environment⌃ (control) + ⇧ (shift) + 8 Add →
  • Show Environment⌃ (control) + 8 Add →
  • Zoom Packages⌃ (control) + ⇧ (shift) + 7 Add →
  • Show Packages⌃ (control) + 7 Add →
  • Zoom Plots⌃ (control) + ⇧ (shift) + 6 Add →
  • Show Plots⌃ (control) + 6 Add →
  • Zoom Files⌃ (control) + ⇧ (shift) + 5 Add →
  • Show Files⌃ (control) + 5 Add →
  • Zoom History⌃ (control) + ⇧ (shift) + 4 Add →
  • Show History⌃ (control) + 4 Add →
  • Move focus to Terminal⌥ (option) + ⇧ (shift) + t Add →
  • Zoom Help⌃ (control) + ⇧ (shift) + 3 Add →
  • Move focus to Help⌃ (control) + 3 Add →
  • Zoom Console⌃ (control) + ⇧ (shift) + 2 Add →
  • Move focus to Console⌃ (control) + 2 Add →
  • Zoom Source Editor⌃ (control) + ⇧ (shift) + 1 Add →
  • Move focus to Source Editor⌃ (control) + 1 Add →

Completions

Editing

  • Find usages for symbol at cursor (C++)⌥ (option) + ⌘ (command) + u Add →
  • Show source code for function at cursorf2 Add →
  • Show help for function at cursorf1 Add →
  • Insert pipe operator⇧ (shift) + ⌘ (command) + m Add →
  • Insert assignment operator⌥ (option) + - Add →
  • Insert currently yanked text⌃ (control) + y Add →
  • Yank line after cursor⌃ (control) + k Add →
  • Yank line up to cursor⌃ (control) + u Add →
  • Outdent⇧ (shift) + ⇥ Add →
  • Indent (at beginning of line)⇥ Add →
  • Delete to Line Start⌥ (option) + ⌫ Add →
  • Delete to Line End⌃ (control) + k Add →
  • Delete Word Right⌥ (option) + ⌫ Add →
  • Delete Word Left⌥ (option) + ⌫ Add →
  • Select to Start/End⇧ (shift) + ⌘ (command) + ↑ Add →
  • Select Page Up/Down⇧ (shift) + pageup Add →
  • Select to Line End⇧ (shift) + ⌘ (command) + → Add →
  • Select to Line Start⇧ (shift) + ⌘ (command) + ← Add →
  • Select Word⌥ (option) + ⇧ (shift) + ← Add →
  • Select⇧ (shift) + ↑ Add →
  • Delete Line⌘ (command) + d Add →
  • Jump to Start/End⌘ (command) + home Add →
  • Jump to Word⌥ (option) + ← Add →
  • Select All⌘ (command) + a Add →
  • Paste⌘ (command) + v Add →
  • Copy⌘ (command) + c Add →
  • Cut⌘ (command) + x Add →
  • Redo⇧ (shift) + ⌘ (command) + z Add →
  • Undo⌘ (command) + z Add →

Source

  • Insert Roxygen Skeleton⌥ (option) + ⇧ (shift) + ⌘ (command) + r Add →
  • Rename Symbol in Scope⌥ (option) + ⇧ (shift) + ⌘ (command) + m Add →
  • Check Spellingf7 Add →
  • Find in Files⇧ (shift) + ⌘ (command) + f Add →
  • Replace and Find⇧ (shift) + ⌘ (command) + j Add →
  • Use Selection for Find⌘ (command) + e Add →
  • Find Previous⇧ (shift) + ⌘ (command) + g Add →
  • Find Next⌘ (command) + g Add →
  • Find and Replace⌘ (command) + f Add →
  • Move Active Cursor Down⌃ (control) + ⌥ (option) + ⇧ (shift) + ↓ Add →
  • Move Active Cursor Up⌃ (control) + ⌥ (option) + ⇧ (shift) + ↑ Add →
  • Add Cursor Below Current Cursor⌃ (control) + ⌥ (option) + ↓ Add →
  • Add Cursor Above Current Cursor⌃ (control) + ⌥ (option) + ↑ Add →
  • Expand to Matching Brace/Paren⌃ (control) + ⇧ (shift) + e Add →
  • Jump to Matching Brace/Paren⌃ (control) + p Add →
  • Copy Lines Up/Down⌥ (option) + ⌘ (command) + ↑ Add →
  • Move Lines Up/Down⌥ (option) + ↑ Add →
  • Transpose Letters⌃ (control) + t Add →
  • Show Diagnostics⌥ (option) + ⇧ (shift) + ⌘ (command) + d Add →
  • Reformat Selection⇧ (shift) + ⌘ (command) + a Add →
  • Reflow Comment⇧ (shift) + ⌘ (command) + / Add →
  • Comment/uncomment current line/selection⇧ (shift) + ⌘ (command) + c Add →
  • Reindent lines⌘ (command) + i Add →
  • Extract variable from selection⌥ (option) + ⌘ (command) + v Add →
  • Extract function from selection⌥ (option) + ⌘ (command) + x Add →
  • Navigate forward⌘ (command) + f10 Add →
  • Navigate back⌘ (command) + f9 Add →
  • Last tab⌃ (control) + ⇧ (shift) + f12 Add →
  • First tab⌃ (control) + ⇧ (shift) + f11 Add →
  • Next tab (desktop)⌃ (control) + ⇥ Add →
  • Next tab⌃ (control) + f12 Add →
  • Previous tab (desktop)⌃ (control) + ⇧ (shift) + ⇥ Add →
  • Previous tab⌃ (control) + f11 Add →
  • Switch to tab⌃ (control) + ⇧ (shift) + . Add →
  • Edit lines from start⌃ (control) + ⌥ (option) + ⇧ (shift) + a Add →
  • Split into lines⌃ (control) + ⌥ (option) + a Add →
  • Previous section⌘ (command) + pageup Add →
  • Next section⌘ (command) + pagedown Add →
  • Shrink selection⌃ (control) + ⌥ (option) + ⇧ (shift) + ↓ Add →
  • Expand selection⌃ (control) + ⌥ (option) + ⇧ (shift) + ↑ Add →
  • Jump to⌥ (option) + ⇧ (shift) + ⌘ (command) + j Add →
  • Go to line⌥ (option) + ⇧ (shift) + ⌘ (command) + g Add →
  • Unfold All⌥ (option) + ⇧ (shift) + ⌘ (command) + o Add →
  • Fold All⌥ (option) + ⌘ (command) + o Add →
  • Unfold Selected⌥ (option) + ⇧ (shift) + ⌘ (command) + l Add →
  • Fold Selected⌥ (option) + ⌘ (command) + l Add →
  • Send current line/selection to terminal⌥ (option) + ⌘ (command) + ↵ Add →
  • Source the current document (with echo)⇧ (shift) + ⌘ (command) + ↵ Add →
  • Source the current document⇧ (shift) + ⌘ (command) + s Add →
  • Source a file⌃ (control) + ⌥ (option) + g Add →
  • Run the next Sweave/Rmd chunk⌥ (option) + ⌘ (command) + n Add →
  • Run the current Sweave/Rmd chunk⌥ (option) + ⌘ (command) + c Add →
  • Run previous Sweave/Rmd code⌥ (option) + ⇧ (shift) + ⌘ (command) + p Add →
  • Run the current code section⌥ (option) + ⌘ (command) + t Add →
  • Run the current function definition⌥ (option) + ⌘ (command) + f Add →
  • Run from current line to document end⌥ (option) + ⌘ (command) + e Add →
  • Run from document beginning to current line⌥ (option) + ⌘ (command) + b Add →
  • Run current document⌥ (option) + ⌘ (command) + r Add →
  • Re-run previous region⌥ (option) + ⌘ (command) + p Add →
  • Run current line/selection (retain cursor)⌥ (option) + ↵ Add →
  • Run current line/selection⌘ (command) + ↵ Add →
  • Insert code section⇧ (shift) + ⌘ (command) + r Add →
  • Insert chunk (Sweave and Knitr)⌥ (option) + ⌘ (command) + i Add →
  • Compile PDF (TeX and Sweave)⇧ (shift) + ⌘ (command) + k Add →
  • Compile Notebook⇧ (shift) + ⌘ (command) + k Add →
  • Knit Document (knitr)⇧ (shift) + ⌘ (command) + k Add →
  • Preview HTML (Markdown and HTML)⇧ (shift) + ⌘ (command) + k Add →
  • Close other documents⌥ (option) + ⇧ (shift) + ⌘ (command) + w Add →
  • Close all open documents⇧ (shift) + ⌘ (command) + w Add →
  • Close active document (Chrome only)⌥ (option) + ⌘ (command) + w Add →
  • Close active document (except on Chrome)⌘ (command) + w Add →
  • Save all documents⌃ (control) + ⌥ (option) + s Add →
  • Save active document⌘ (command) + s Add →
  • Open document⌘ (command) + o Add →
  • New document (Chrome only)⌥ (option) + ⇧ (shift) + ⌘ (command) + n Add →
  • New document (except on Chrome/Windows)⇧ (shift) + ⌘ (command) + n Add →
  • Toggle document outline⇧ (shift) + ⌘ (command) + o Add →
  • Move cursor to Source Editor⌃ (control) + 1 Add →
  • Go to File/Function⌃ (control) + . Add →

Console

  • Change working directory⌃ (control) + ⇧ (shift) + h Add →
  • Interrupt currently executing commandesc Add →
  • Popup command history⌘ (command) + ↑ Add →
  • Navigate command history↑ Add →
  • Move cursor to end of line⌘ (command) + → Add →
  • Move cursor to beginning of line⌘ (command) + ← Add →
  • Clear console⌃ (control) + l Add →
  • Move cursor to Console⌃ (control) + 2 Add →

Download Keyboard Cheat Sheet for RStudio for Mac

Do you want all keyboard shortcuts for RStudio in one pdf?

Cheat sheet

Community shortcuts for RStudio

Be the first to share — open Pie Menu → RStudio → Share Config

View community page →
Pie Menu

Get started with Pie Menu today.

The convenience of shortcuts without the memorization!