Shortcut Key Of RStudio Win,Mac,Linux




Console

DescriptionWindows & LinuxMac
Move cursor to ConsoleCtrl+2Ctrl+2
Clear consoleCtrl+LCtrl+L
Move cursor to beginning of lineHomeCommand+Left
Move cursor to end of lineEndCommand+Right
Navigate command historyUp/DownUp/Down
Popup command historyCtrl+UpCommand+Up
Interrupt currently executing commandEscEsc
Change working directoryCtrl+Shift+HCtrl+Shift+H

Source

DescriptionWindows & LinuxMac
Goto File/FunctionCtrl+.Ctrl+.
Move cursor to Source EditorCtrl+1Ctrl+1
New document (except on Chrome/Windows)Ctrl+Shift+NCommand+Shift+N
New document (Chrome only)Ctrl+Alt+Shift+NCommand+Shift+Alt+N
Open documentCtrl+OCommand+O
Save active documentCtrl+SCommand+S
Close active document (except on Chrome)Ctrl+WCommand+W
Close active document (Chrome only)Ctrl+Alt+WCommand+Option+W
Close all open documentsCtrl+Shift+WCommand+Shift+W
Preview HTML (Markdown and HTML)Ctrl+Shift+KCommand+Shift+K
Knit Document (knitr)Ctrl+Shift+KCommand+Shift+K
Compile NotebookCtrl+Shift+KCommand+Shift+K
Compile PDF (TeX and Sweave)Ctrl+Shift+KCommand+Shift+K
Insert chunk (Sweave and Knitr)Ctrl+Alt+ICommand+Option+I
Insert code sectionCtrl+Shift+RCommand+Shift+R
Run current line/selectionCtrl+EnterCommand+Enter
Run current line/selection (retain cursor position)Alt+EnterOption+Enter
Re-run previous regionCtrl+Shift+PCommand+Shift+P
Run current documentCtrl+Alt+RCommand+Option+R
Run from document beginning to current lineCtrl+Alt+BCommand+Option+B
Run from current line to document endCtrl+Alt+ECommand+Option+E
Run the current function definitionCtrl+Alt+FCommand+Option+F
Run the current code sectionCtrl+Alt+TCommand+Option+T
Run previous Sweave/Rmd codeCtrl+Alt+PCommand+Option+P
Run the current Sweave/Rmd chunkCtrl+Alt+CCommand+Option+C
Run the next Sweave/Rmd chunkCtrl+Alt+NCommand+Option+N
Source a fileCtrl+Shift+OCommand+Shift+O
Source the current documentCtrl+Shift+SCommand+Shift+S
Source the current document (with echo)Ctrl+Shift+EnterCommand+Shift+Enter
Fold SelectedAlt+LCmd+Option+L
Unfold SelectedShift+Alt+LCmd+Shift+Option+L
Fold AllAlt+OCmd+Option+O
Unfold AllShift+Alt+OCmd+Shift+Option+O
Go to lineShift+Alt+GCmd+Shift+Option+G
Jump toShift+Alt+JCmd+Shift+Option+J
Switch to tabCtrl+Shift+.Ctrl+Shift+.
Previous tabCtrl+F11Ctrl+F11
Next tabCtrl+F12Ctrl+F12
First tabCtrl+Shift+F11Ctrl+Shift+F11
Last tabCtrl+Shift+F12Ctrl+Shift+F12
Navigate backCtrl+F9Cmd+F9
Navigate forwardCtrl+F10Cmd+F10
Extract function from selectionCtrl+Alt+XCommand+Option+X
Extract variable from selectionCtrl+Alt+VCommand+Option+V
Reindent linesCtrl+ICommand+I
Comment/uncomment current line/selectionCtrl+Shift+CCommand+Shift+C
Reflow CommentCtrl+Shift+/Command+Shift+/
Reformat SelectionCtrl+Shift+ACommand+Shift+A
Show DiagnosticsCtrl+Shift+Alt+PCommand+Shift+Alt+P
Transpose LettersCtrl+T
Move Lines Up/DownAlt+Up/DownOption+Up/Down
Copy Lines Up/DownShift+Alt+Up/DownCommand+Option+Up/Down
Jump to Matching Brace/ParenCtrl+PCtrl+P
Expand to Matching Brace/ParenCtrl+Shift+ECtrl+Shift+E
Select to Matching Brace/ParenCtrl+Shift+Alt+ECtrl+Shift+Alt+E
Add Cursor Above Current CursorCtrl+Alt+UpCtrl+Alt+Up
Add Cursor Below Current CursorCtrl+Alt+DownCtrl+Alt+Down
Move Active Cursor UpCtrl+Alt+Shift+UpCtrl+Alt+Shift+Up
Move Active Cursor DownCtrl+Alt+Shift+DownCtrl+Alt+Shift+Down
Find and ReplaceCtrl+FCommand+F
Find NextWin: F3, Linux: Ctrl+GCommand+G
Find PreviousWin: Shift+F3, Linux: Ctrl+Shift+GCommand+Shift+G
Use Selection for FindCtrl+F3Command+E
Replace and FindCtrl+Shift+JCommand+Shift+J
Find in FilesCtrl+Shift+FCommand+Shift+F
Check SpellingF7F7

Editing (Console and Source)

DescriptionWindows & LinuxMac
UndoCtrl+ZCommand+Z
RedoCtrl+Shift+ZCommand+Shift+Z
CutCtrl+XCommand+X
CopyCtrl+CCommand+C
PasteCtrl+VCommand+V
Select AllCtrl+ACommand+A
Jump to WordCtrl+Left/RightOption+Left/Right
Jump to Start/EndCtrl+Home/End or Ctrl+Up/DownCommand+Home/End or Command+Up/Down
Delete LineCtrl+DCommand+D
SelectShift+[Arrow]Shift+[Arrow]
Select WordCtrl+Shift+Left/RightOption+Shift+Left/Right
Select to Line StartAlt+Shift+LeftCommand+Shift+Left
Select to Line EndAlt+Shift+RightCommand+Shift+Right
Select Page Up/DownShift+PageUp/PageDownShift+PageUp/Down
Select to Start/EndCtrl+Shift+Home/End or Shift+Alt+Up/DownCommand+Shift+Up/Down
Delete Word LeftCtrl+BackspaceOption+Backspace or Ctrl+Option+Backspace
Delete Word RightOption+Delete
Delete to Line EndCtrl+K
Delete to Line StartOption+Backspace
IndentTab (at beginning of line)Tab (at beginning of line)
OutdentShift+TabShift+Tab
Yank line up to cursorCtrl+UCtrl+U
Yank line after cursorCtrl+KCtrl+K
Insert currently yanked textCtrl+YCtrl+Y
Insert assignment operatorAlt+-Option+-
Insert pipe operatorCtrl+Shift+MCmd+Shift+M
Show help for function at cursorF1F1
Show source code for function at cursorF2F2
Find usages for symbol at cursor (C++)Ctrl+Alt+UCmd+Option+U

Completions (Console and Source)

DescriptionWindows & LinuxMac
Attempt completionTab or Ctrl+SpaceTab or Command+Space
Navigate candidatesUp/DownUp/Down
Accept selected candidateEnter, Tab, or RightEnter, Tab, or Right
Dismiss completion popupEscEsc

Views

DescriptionWindows & LinuxMac
Move focus to Source EditorCtrl+1Ctrl+1
Move focus to ConsoleCtrl+2Ctrl+2
Move focus to HelpCtrl+3Ctrl+3
Show HistoryCtrl+4Ctrl+4
Show FilesCtrl+5Ctrl+5
Show PlotsCtrl+6Ctrl+6
Show PackagesCtrl+7Ctrl+7
Show EnvironmentCtrl+8Ctrl+8
Show Git/SVNCtrl+9Ctrl+9
Show BuildCtrl+0Ctrl+0
Sync Editor & PDF PreviewCtrl+F8Cmd+F8
Show Keyboard Shortcut ReferenceAlt+Shift+KOption+Shift+K

Build

DescriptionWindows & LinuxMac
Build and ReloadCtrl+Shift+BCmd+Shift+B
Load All (devtools)Ctrl+Shift+LCmd+Shift+L
Test Package (Desktop)Ctrl+Shift+TCmd+Shift+T
Test Package (Web)Ctrl+Alt+F7Cmd+Alt+F7
Check PackageCtrl+Shift+ECmd+Shift+E
Document PackageCtrl+Shift+DCmd+Shift+D

Debug

DescriptionWindows & LinuxMac
Toggle BreakpointShift+F9Shift+F9
Execute Next LineF10F10
Step Into FunctionShift+F4Shift+F4
Finish Function/LoopShift+F6Shift+F6
ContinueShift+F5Shift+F5
Stop DebuggingShift+F8Shift+F8

Plots

DescriptionWindows & LinuxMac
Previous plotCtrl+Alt+F11Command+Option+F11
Next plotCtrl+Alt+F12Command+Option+F12

Git/SVN

DescriptionWindows & LinuxMac
Diff active source documentCtrl+Alt+DCtrl+Option+D
Commit changesCtrl+Alt+MCtrl+Option+M
Scroll diff viewCtrl+Up/DownCtrl+Up/Down
Stage/Unstage (Git)SpacebarSpacebar
Stage/Unstage and move to next (Git)EnterEnter

Session

DescriptionWindows & LinuxMac
Quit Session (desktop only)Ctrl+QCommand+Q
Restart R SessionCtrl+Shift+F10Command+Shift+F10

Post a Comment

Previous Post Next Post