134 Shortcuts for RStudio

Jump to: Console, Source, Completions (Console and Source), Views, Build, Debug, Plots, Git / SVN, Session, Editing (Console and Source)

1. Console

Ctrl+2

Move cursor to console

Ctrl+L

Clean console

Home

Move cursor to beginning of line

End

Move cursor to end of line

Up/Down

Navigate command history

Ctrl+Up

Popup command history

Esc

Interrupt currently executing command

Ctrl+Shift+H

Change working directory

2. Source

Ctrl+.

Goto file/function

Ctrl+1

Move cursor to source editor

Ctrl+Shift+N

New document (except on chrome/windows)

Ctrl+Alt+Shift+N

New document (Chrome only)

Ctrl+O

Open document

Ctrl+S

Save active document

Ctrl+W

Close active document (except on Chrome)

Ctrl+Alt+W

Close active document (Chrome only)

Ctrl+Shift+W

Close all open documents

Ctrl+Shift+K

Preview HTML (markdown and HTML)

Ctrl+Shift+K

Compile notebook/compile PDF (TeX and Sweave)

Ctrl+Alt+I

Insert chunk (Sweave and Knitr)

Ctrl+Shift+R

Insert code section

Ctrl+Enter

Run current line/selection

Alt+Enter

Run current line/selection (retain cursor position)

Ctrl+Shift+P

Re-run previous region

Ctrl+Alt+R

Run current document

Ctrl+Alt+B

Run from document beginning to current line

Ctrl+Alt+E

Run from current line to document end

Ctrl+Alt+F

Run from current line to document end

Ctrl+Alt+T

Run the current code section

Ctrl+Alt+P

Run previous sweave/Rmd code

Ctrl+Alt+C

Run the current Sweave/Rmd chunk

Ctrl+Alt+N

Run the next Sweave/Rmd chunk

Ctrl+Shift+O

Source a file

Ctrl+Shift+S

Source the current document

Ctrl+Shift+Enter

Source the current document (with echo)

Alt+L

Fold selected

Shift+Alt+L

Unfold selected

Alt+O

Fold all

Shift+Alt+O

Unfold all

Shift+Alt+G

Go to line

Shift+Alt+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

Ctrl+F9

Navigate back

Ctrl+F10

Navigate forward

Ctrl+Alt+X

Extract function from selection

Ctrl+Alt+V

Extract variable from selection

Ctrl+I

Reindent lines

Ctrl+Shift+C

Comment/uncomment current line/selection

Ctrl+Shift+/

Reflow comment

Ctrl+Shift+A

Reformat selection

Ctrl+Shift+Shift+P

Show diagnostics

Alt+Up/Down

Move lines Up/Down

Shift+Alt+Up/Down

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+Up

Add cursor above current cursor

Ctrl+Alt+Down

Add cursor beow current cursor

Ctrl+Alt+Shift+Up

Move active cursor up

Ctrl+Alt+Shift+Down

Move Active Cursor Down

Ctrl+F

Find and replace

F3

Find next

Shift+F3

Find previous

Ctrl+F3

Use selection for find

Ctrl+Shift+J

Replace and find

Ctrl+Shift+F

Find in files

F7

Check spelling

3. Completions (Console and Source)

Tab/Ctrl+Space

Attempt completion

Up/Down

Navigate candidates

Enter/Tab/Right

Accept selected candidate

Esc

Dismiss completion popup

4. Views

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

Ctrl+F8

Sync editor & pdf preview

Alt+Shift+K

Reference

5. Build

Ctrl+Shift+B

Build and reload

Ctrl+Shift+L

Load all (devtools)

Ctrl+Shift+T

Test package (desktop)

Ctrl+Alt+F7

Test package (web)

Ctrl+Shift+E

Check package

Ctrl+Shift+D

Document package

6. Debug

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

7. Plots

Ctrl+Alt+F11

Previous plot

Ctrl+Alt+F12

Next plot

8. Git / SVN

Ctrl+Alt+D

Diff active source document

Ctrl+Alt+M

Commit changes

Ctrl+Up/Down

Scroll diff view

Spacebar

Stage/unstage(Git)

ENter

Stage/unstage and move to next (Git)

9. Session

Ctrl+Q

Quit Session (desktop only)

Ctrl+Shift+F10

Restart R Session

10. Editing (Console and Source)

Ctrl+Z

Undo

Ctrl+Shift+Z

Redo

Ctrl+X

Cut

Ctrl+C

Copy

Ctrl+V

Paste

Ctrl+A

Select all

Ctrl+Left/Right

Jump to word

Ctrl+Home/End/Ctrl+Up/Down

Jump to start/end

Ctrl+D

Delete line

Shift+Arrow

Select

Ctrl+Shift+Left/Right

Select word

Alt+Shift+Left

Select to line start

Alt+Shift+RIght

Select to line end

Shift+Page Up/Shift+Page down

Select page up/down

Ctrl+Shift+Home/End

Select page start/end

Ctrl+Backspace

Delete word left

Tab

Indent

Shift+Tab

Outdent

Ctrl+U

Yank line up to cursor

Ctrl+K

Yank line after cursor

Ctrl+Y

Insert currently yanked text

Alt+-

Insert assignment operator

Ctrl+Shift+M

Insert pipe operator

F1

Show help for function at cursor

F2

Show source code for function at cursor

Ctrl+Alt+U

Find usages for symbol at cursor (C++)

icon

RStudio Shortcuts

Advertising for Consideration:

Ads for Consideration:

Related:

Please kindly review and accept Terms of Use and Cookie & Policy Policy