7
Keyboard Shortcuts Console Description Windows & Linux Mac Move cursor to Console Ctrl+2 Ctrl+2 Clear console Ctrl+L Ctrl+L Move cursor to beginning of line Home Command+Left Move cursor to end of line End Command+Right Navigate command history Up/Down Up/Down Popup command history Ctrl+Up Command+Up Interrupt currently executing command Esc Esc Change working directory Ctrl+Shift+H Ctrl+Shift+H Source Description Windows & Linux Mac Goto File/Function Ctrl+. Ctrl+. Move cursor to Source Editor Ctrl+1 Ctrl+1 New document (except on Chrome/Windows) Ctrl+Shift+N Command+Shift+N New document (Chrome only) Ctrl+Alt+Shift+N Command+Shift+Alt+N Open document Ctrl+O Command+O Save active document Ctrl+S Command+S Close active document (except on Chrome) Ctrl+W Command+W Close active document (Chrome Ctrl+Alt+W Command+Option+W

Keyboard Shortcuts for R

Embed Size (px)

DESCRIPTION

Keyboard Shortcuts for R

Citation preview

Page 1: Keyboard Shortcuts for R

Keyboard Shortcuts

ConsoleDescription Windows & Linux Mac

Move cursor to Console Ctrl+2 Ctrl+2Clear console Ctrl+L Ctrl+LMove cursor to beginning of line

Home Command+Left

Move cursor to end of line End Command+RightNavigate command history Up/Down Up/DownPopup command history Ctrl+Up Command+UpInterrupt currently executing command

Esc Esc

Change working directory Ctrl+Shift+H Ctrl+Shift+H 

SourceDescription Windows & Linux Mac

Goto File/Function Ctrl+. Ctrl+.Move cursor to Source Editor Ctrl+1 Ctrl+1New document (except on Chrome/Windows)

Ctrl+Shift+N Command+Shift+N

New document (Chrome only)

Ctrl+Alt+Shift+N Command+Shift+Alt+N

Open document Ctrl+O Command+OSave active document Ctrl+S Command+SClose active document (except on Chrome)

Ctrl+W Command+W

Close active document (Chrome only)

Ctrl+Alt+W Command+Option+W

Close all open documents Ctrl+Shift+W Command+Shift+WPreview HTML (Markdown and HTML)

Ctrl+Shift+K Command+Shift+K

Knit Document (knitr) Ctrl+Shift+K Command+Shift+KCompile Notebook Ctrl+Shift+K Command+Shift+KCompile PDF (TeX and Sweave)

Ctrl+Shift+K Command+Shift+K

Insert chunk (Sweave and Knitr)

Ctrl+Alt+I Command+Option+I

Insert code section Ctrl+Shift+R Command+Shift+RRun current line/selection Ctrl+Enter Command+EnterRun current line/selection Alt+Enter Option+Enter

Page 2: Keyboard Shortcuts for R

(retain cursor position)Re-run previous region Ctrl+Shift+P Command+Shift+PRun current document Ctrl+Alt+R Command+Option+RRun from document beginning to current line

Ctrl+Alt+B Command+Option+B

Run from current line to document end

Ctrl+Alt+E Command+Option+E

Run the current function definition

Ctrl+Alt+F Command+Option+F

Run the current code section Ctrl+Alt+T Command+Option+TRun previous Sweave/Rmd code

Ctrl+Alt+P Command+Option+P

Run the current Sweave/Rmd chunk

Ctrl+Alt+C Command+Option+C

Run the next Sweave/Rmd chunk

Ctrl+Alt+N Command+Option+N

Source a file Ctrl+Shift+O Command+Shift+OSource the current document Ctrl+Shift+S Command+Shift+SSource the current document (with echo)

Ctrl+Shift+Enter Command+Shift+Enter

Fold Selected Alt+L Cmd+Option+LUnfold Selected Shift+Alt+L Cmd+Shift+Option+LFold All Alt+O Cmd+Option+OUnfold All Shift+Alt+O Cmd+Shift+Option+OGo to line Shift+Alt+G Cmd+Shift+Option+GJump to Shift+Alt+J Cmd+Shift+Option+JSwitch to tab Ctrl+Shift+. Ctrl+Shift+.Previous tab Ctrl+F11 Ctrl+F11Next tab Ctrl+F12 Ctrl+F12First tab Ctrl+Shift+F11 Ctrl+Shift+F11Last tab Ctrl+Shift+F12 Ctrl+Shift+F12Navigate back Ctrl+F9 Cmd+F9Navigate forward Ctrl+F10 Cmd+F10Extract function from selection

Ctrl+Alt+X Command+Option+X

Extract variable from selection

Ctrl+Alt+V Command+Option+V

Reindent lines Ctrl+I Command+IComment/uncomment current line/selection

Ctrl+Shift+C Command+Shift+C

Reflow Comment Ctrl+Shift+/ Command+Shift+/Reformat Selection Ctrl+Shift+A Command+Shift+A

Page 3: Keyboard Shortcuts for R

Show Diagnostics Ctrl+Shift+Alt+P Command+Shift+Alt+PTranspose Letters   Ctrl+TMove Lines Up/Down Alt+Up/Down Option+Up/DownCopy Lines Up/Down Shift+Alt+Up/Down Command+Option+Up/DownJump to Matching Brace/Paren

Ctrl+P Ctrl+P

Expand to Matching Brace/Paren

Ctrl+Shift+E Ctrl+Shift+E

Select to Matching Brace/Paren

Ctrl+Shift+Alt+E Ctrl+Shift+Alt+E

Add Cursor Above Current Cursor

Ctrl+Alt+Up Ctrl+Alt+Up

Add Cursor Below Current Cursor

Ctrl+Alt+Down Ctrl+Alt+Down

Move Active Cursor Up Ctrl+Alt+Shift+Up Ctrl+Alt+Shift+UpMove Active Cursor Down Ctrl+Alt+Shift+Down Ctrl+Alt+Shift+DownFind and Replace Ctrl+F Command+FFind Next Win: F3, Linux: Ctrl+G Command+G

Find PreviousWin: Shift+F3, Linux: Ctrl+Shift+G

Command+Shift+G

Use Selection for Find Ctrl+F3 Command+EReplace and Find Ctrl+Shift+J Command+Shift+JFind in Files Ctrl+Shift+F Command+Shift+FCheck Spelling F7 F7 

Editing (Console and Source)Description Windows & Linux Mac

Undo Ctrl+Z Command+ZRedo Ctrl+Shift+Z Command+Shift+ZCut Ctrl+X Command+XCopy Ctrl+C Command+CPaste Ctrl+V Command+VSelect All Ctrl+A Command+AJump to Word Ctrl+Left/Right Option+Left/Right

Jump to Start/EndCtrl+Home/End or Ctrl+Up/Down

Command+Home/End or Command+Up/Down

Delete Line Ctrl+D Command+DSelect Shift+[Arrow] Shift+[Arrow]Select Word Ctrl+Shift+Left/Right Option+Shift+Left/RightSelect to Line Start Alt+Shift+Left Command+Shift+LeftSelect to Line End Alt+Shift+Right Command+Shift+Right

Page 4: Keyboard Shortcuts for R

Select Page Up/Down Shift+PageUp/PageDown Shift+PageUp/Down

Select to Start/EndCtrl+Shift+Home/End or Shift+Alt+Up/Down

Command+Shift+Up/Down

Delete Word Left Ctrl+BackspaceOption+Backspace or Ctrl+Option+Backspace

Delete Word Right   Option+DeleteDelete to Line End   Ctrl+KDelete to Line Start   Option+BackspaceIndent Tab (at beginning of line) Tab (at beginning of line)Outdent Shift+Tab Shift+TabYank line up to cursor Ctrl+U Ctrl+UYank line after cursor Ctrl+K Ctrl+KInsert currently yanked text Ctrl+Y Ctrl+YInsert assignment operator Alt+- Option+-Insert pipe operator Ctrl+Shift+M Cmd+Shift+MShow help for function at cursor

F1 F1

Show source code for function at cursor

F2 F2

Find usages for symbol at cursor (C++)

Ctrl+Alt+U Cmd+Option+U

 

Completions (Console and Source)Description Windows & Linux Mac

Attempt completion Tab or Ctrl+Space Tab or Command+SpaceNavigate candidates Up/Down Up/DownAccept selected candidate Enter, Tab, or Right Enter, Tab, or RightDismiss completion popup Esc Esc 

ViewsDescription Windows & Linux Mac

Move focus to Source Editor Ctrl+1 Ctrl+1Move focus to Console Ctrl+2 Ctrl+2Move focus to Help Ctrl+3 Ctrl+3Show History Ctrl+4 Ctrl+4Show Files Ctrl+5 Ctrl+5Show Plots Ctrl+6 Ctrl+6Show Packages Ctrl+7 Ctrl+7Show Environment Ctrl+8 Ctrl+8Show Git/SVN Ctrl+9 Ctrl+9Show Build Ctrl+0 Ctrl+0

Page 5: Keyboard Shortcuts for R

Sync Editor & PDF Preview Ctrl+F8 Cmd+F8Show Keyboard Shortcut Reference

Alt+Shift+K Option+Shift+K

 

BuildDescription Windows & Linux Mac

Build and Reload Ctrl+Shift+B Cmd+Shift+BLoad All (devtools) Ctrl+Shift+L Cmd+Shift+LTest Package (Desktop) Ctrl+Shift+T Cmd+Shift+TTest Package (Web) Ctrl+Alt+F7 Cmd+Alt+F7Check Package Ctrl+Shift+E Cmd+Shift+EDocument Package Ctrl+Shift+D Cmd+Shift+D 

DebugDescription Windows & Linux Mac

Toggle Breakpoint Shift+F9 Shift+F9Execute Next Line F10 F10Step Into Function Shift+F4 Shift+F4Finish Function/Loop Shift+F6 Shift+F6Continue Shift+F5 Shift+F5Stop Debugging Shift+F8 Shift+F8 

PlotsDescription Windows & Linux Mac

Previous plot Ctrl+Alt+F11 Command+Option+F11Next plot Ctrl+Alt+F12 Command+Option+F12 

Git/SVNDescription Windows & Linux Mac

Diff active source document Ctrl+Alt+D Ctrl+Option+DCommit changes Ctrl+Alt+M Ctrl+Option+MScroll diff view Ctrl+Up/Down Ctrl+Up/DownStage/Unstage (Git) Spacebar SpacebarStage/Unstage and move to next (Git)

Enter Enter

 

SessionDescription Windows & Linux Mac

Quit Session (desktop only) Ctrl+Q Command+QRestart R Session Ctrl+Shift+F10 Command+Shift+F10

Page 6: Keyboard Shortcuts for R