RStudio (Mac) keyboard shortcuts

RStudio (Mac)

Zeynel Abidin Öztürk -
18 months ago
- Shortcuts
Ctrl + 2

Move cursor to Console

Ctrl + L

Clear console

⌘ Cmd + ←

Move cursor to beginning of line

⌘ Cmd + β†’

Move cursor to end of line

↑  β†“

Navigate command history

⌘ Cmd + ↑

Popup command history

Esc

Interrupt currently executing command

Ctrl + ↑   Shift + H

Change working directory

Ctrl + .

Goto File/Function

Ctrl + 1

Move cursor to Source Editor

⌘ Cmd + ↑   Shift + N

New document (except on Chrome/Windows)

⌘ Cmd + ↑   Shift + Alt + N

New document (Chrome only)

⌘ Cmd + O

Open document

⌘ Cmd + S

Save active document

⌘ Cmd + W

Close active document (except on Chrome)

⌘ Cmd + βŒ₯ Option + W

Close active document (Chrome only)

⌘ Cmd + ↑   Shift + W

Close all open documents

⌘ Cmd + ↑   Shift + K

Preview HTML (Markdown and HTML)

⌘ Cmd + ↑   Shift + K

Knit Document (knitr)

⌘ Cmd + ↑   Shift + K

Compile Notebook

⌘ Cmd + ↑   Shift + K

Compile PDF (TeX and Sweave)

⌘ Cmd + βŒ₯ Option + I

Insert chunk (Sweave and Knitr)

⌘ Cmd + ↑   Shift + R

Insert code section

⌘ Cmd + • Enter

Run current line/selection

βŒ₯ Option + • Enter

Run current line/selection (retain cursor position)

⌘ Cmd + ↑   Shift + P

Re-run previous region

⌘ Cmd + βŒ₯ Option + R

Run current document

⌘ Cmd + βŒ₯ Option + B

Run from document beginning to current line

⌘ Cmd + βŒ₯ Option + E

Run from current line to document end

⌘ Cmd + βŒ₯ Option + F

Run the current function definition

⌘ Cmd + βŒ₯ Option + T

Run the current code section

⌘ Cmd + βŒ₯ Option + P

Run previous Sweave/Rmd code

⌘ Cmd + βŒ₯ Option + C

Run the current Sweave/Rmd chunk

⌘ Cmd + βŒ₯ Option + N

Run the next Sweave/Rmd chunk

⌘ Cmd + ↑   Shift + O

Source a file

⌘ Cmd + ↑   Shift + S

Source the current document

⌘ Cmd + ↑   Shift + • Enter

Source the current document (with echo)

⌘ Cmd + βŒ₯ Option + L

Fold Selected

⌘ Cmd + ↑   Shift + βŒ₯ Option + L

Unfold Selected

⌘ Cmd + βŒ₯ Option + O

Fold All

⌘ Cmd + ↑   Shift + βŒ₯ Option + O

Unfold All

⌘ Cmd + ↑   Shift + βŒ₯ Option + G

Go to line

⌘ Cmd + ↑   Shift + βŒ₯ Option + J

Jump to

Ctrl + ↑   Shift + .

Switch to tab

Ctrl + F11

Previous tab

Ctrl + F12

Next tab

Ctrl + ↑   Shift + F11

First tab

Ctrl + ↑   Shift + F12

Last tab

⌘ Cmd + F9

Navigate back

⌘ Cmd + F10

Navigate forward

⌘ Cmd + βŒ₯ Option + X

Extract function from selection

⌘ Cmd + βŒ₯ Option + V

Extract variable from selection

⌘ Cmd + I

Reindent lines

⌘ Cmd + ↑   Shift + C

Comment/uncomment current line/selection

⌘ Cmd + ↑   Shift + /

Reflow Comment

⌘ Cmd + ↑   Shift + A

Reformat Selection

⌘ Cmd + ↑   Shift + Alt + P

Show Diagnostics

Ctrl + T

Transpose Letters

βŒ₯ Option + ↑  β†“

Move Lines Up/Down

⌘ Cmd + βŒ₯ Option + ↑  β†“

Copy Lines Up/Down

Ctrl + P

Jump to Matching Brace/Paren

Ctrl + ↑   Shift + E

Expand to Matching Brace/Paren

Ctrl + ↑   Shift + Alt + E

Select to Matching Brace/Paren

Ctrl + Alt + ↑

Add Cursor Above Current Cursor

Ctrl + Alt + ↓

Add Cursor Below Current Cursor

Ctrl + Alt + ↑   Shift + ↑

Move Active Cursor Up

Ctrl + Alt + ↑   Shift + ↓

Move Active Cursor Down

⌘ Cmd + F

Find and Replace

⌘ Cmd + G

Find Next

⌘ Cmd + ↑   Shift + G

Find Previous

⌘ Cmd + E

Use Selection for Find

⌘ Cmd + ↑   Shift + J

Replace and Find

⌘ Cmd + ↑   Shift + F

Find in Files

F7

Check Spelling

⌘ Cmd + Z

Undo

⌘ Cmd + ↑   Shift + Z

Redo

⌘ Cmd + X

Cut

⌘ Cmd + C

Copy

⌘ Cmd + V

Paste

⌘ Cmd + A

Select All

βŒ₯ Option + ←  β†’

Jump to Word

⌘ Cmd + Home

Jump to Start/End

or ⌘ Cmd + End
or ⌘ Cmd + ↑  β†“
⌘ Cmd + D

Delete Line

↑   Shift + ← β†‘ β†’ β†“

Select

βŒ₯ Option + ↑   Shift + ←  β†’

Select Word

⌘ Cmd + ↑   Shift + ←

Select to Line Start

⌘ Cmd + ↑   Shift + β†’

Select to Line End

Shift + Page Up / Down

Select Page Up/Down

⌘ Cmd + ↑   Shift + ↑  β†“

Select to Start/End

βŒ₯ Option + β¬… Backspace

Delete Word Left

or Ctrl + βŒ₯ Option + β¬… Backspace
βŒ₯ Option + Del

Delete Word Right

Ctrl + K

Delete to Line End

βŒ₯ Option + β¬… Backspace

Delete to Line Start

β­Ύ Tab

(at beginning of line) Indent

↑   Shift + β­Ύ Tab

Outdent

Ctrl + U

Yank line up to cursor

Ctrl + K

Yank line after cursor

Ctrl + Y

Insert currently yanked text

βŒ₯ Option + -

Insert assignment operator

⌘ Cmd + ↑   Shift + M

Insert pipe operator

F1

Show help for function at cursor

F2

Show source code for function at cursor

⌘ Cmd + βŒ₯ Option + U

Find usages for symbol at cursor (C++)

β­Ύ Tab

Attempt completion

or ⌘ Cmd + Space
↑  β†“

Navigate candidates

• Enter

Accept selected candidate

or β­Ύ Tab
or β†’
Esc

Dismiss completion popup

Ctrl + 1

Move focus to Source Editor

Ctrl + 2

Move focus to Console

Ctrl + 3

Move focus to Help

Ctrl + 4

Show History

Ctrl + 5

Show Files

Ctrl + 6

Show Plots

Ctrl + 7

Show Packages

Ctrl + 8

Show Environment

Ctrl + 9

Show Git/SVN

Ctrl + 0

Show Build

⌘ Cmd + F8

Sync Editor & PDF Preview

βŒ₯ Option + ↑   Shift + K

Show Keyboard Shortcut Reference

↑   Shift + F9

Toggle Breakpoint

F10

Execute Next Line

↑   Shift + F4

Step Into Function

↑   Shift + F6

Finish Function/Loop

↑   Shift + F5

Continue

↑   Shift + F8

Stop Debugging

Ctrl + βŒ₯ Option + D

Diff active source document

Ctrl + βŒ₯ Option + M

Commit changes

Ctrl + ↑  β†“

Scroll diff view

Space

Stage/Unstage (Git)

• Enter

Stage/Unstage and move to next (Git)

⌘ Cmd + Q

Quit Session (desktop only)

⌘ Cmd + ↑   Shift + F10

Restart R Session


Share this page on:

Program information

Program name: RStudio (Mac) RStudio (Mac) (Developer tools)

RStudio is an integrated development environment (IDE) for R programming language. R is used for graphics and statistical calculations. Distributed as free and open-source, RStudio was first released on February 2011.

Web page: rstudio.com

Last update: 11 Nov 2019

Shortcut count: 146

How easy to press shortcuts: 78%

Platform detected: Windows and macOS mixed

Similar programs



Advertisement

Join our mailing list!

Your email is kept private and we don't spam.