RStudio Cheat Sheet - ShortcutFoo

LogoHomeDojosAchievementsProfilePricingSign inOpen main menudojoRStudio CheatsheetStart learning for freeShortcutFoo uses a Spaced Repetition System that adapts to your training.scf keyboard

Console I

^2Move cursor to console^LClear console⌘LEFTMove cursor to beginning of line⌘RIGHTMove cursor to end of line⌘UPPopup command historyESCInterrupt currently executing command^⇧HChange working directoryscf keyboard

Source I

^.Goto file/function^1Move cursor to source editor⌘⇧KCompile⌘⌥IInsert chunk (Sweave and Knitr)⌘⇧RInsert code section⌘↵Run current line / selection⌥↵Run current line / selection (retain cursor position)scf keyboard

Source II

⌘⇧PRe-run previous region⌘⌥RRun current document⌘⌥BRun from beginning of document to current line⌘⌥ERun from current line to end of document⌘⌥FRun the current function definition⌘⌥TRun the current code section⌘⌥PRun previous Sweave / Rmd codescf keyboard

Source III

⌘⌥CRun current Sweave / Rmd chunk⌘⇧OSource a file⌘⇧SSource the current document⌘⇧↵Source the current document (with echo)⌘⌥LFold selected⌥⇧LUnfold selected⌘⌥OFold all⌘⌥⇧OUnfold allscf keyboard

Source IV

⌘⌥⇧GGo to line⌘⌥⇧JJump to^⇧.Switch to tab^F11Previous tab^F12Next tab^⇧F11First tab^⇧F12Last tabscf keyboard

Source V

⌘F9Navigate back⌘F10Navigate forward⌘⌥XExtract function from selection⌘⌥VExtract variable from selection⌘IReindent lines⌘⇧AReformat selection⌘⌥⇧PShow diagnosticsscf keyboard

Source VI

^TTranspose letters⌥UPMove lines up⌥DOWNMove lines down⌘⌥UPCopy lines up⌘⌥DOWNCopy lines down^PJump to matching brace / parenthesis^⇧EExpand to matching brace / parenthesis^⌥⇧ESelect to matching brace / parenthesisscf keyboard

Source VII

^⌥UPAdd cursor above current cursor^⌥DOWNAdd cursor below current cursor^⌥⇧UPMove active cursor up^⌥⇧DOWNMove active cursor down⌘FFind and replace⌘GFind next⌘⇧GFind previous⌘EUse selection for find⌘⇧JReplace and find⌘⇧FFind in filesscf keyboard

Editing I

⌥LEFTMove to previous word⌥RIGHTMove to next word⌘UPMove to start⌘DOWNMove to end⌘DDelete line⌥⇧LEFTSelect word to left⌥⇧RIGHTSelect word to rightscf keyboard

Editing II

⌘⇧LEFTSelect to line start⌘⇧RIGHTSelect to line end⌘⇧UPSelect to start⌘⇧DOWNSelect to end⌥BACKSPACEDelete word left^KDelete to line end^⌥BACKSPACEDelete to line startscf keyboard

Editing III

⇧TABOutdentTABIndent^UYank line up to cursor^KYank line after cursor^YInsert currently yanked text⌥-Insert assignment operator⌘⇧MInsert pipe operatorF1Show help for function at cursorF2Show source code for function at cursor⌘⌥UFind usages for symbol at cursor (c++)scf keyboard

Views I

^1Move focus to source editor^2Move focus to console^3Move focus to help^4Show history^5Show files^6Show plots^7Show packages^8Show environment^9Show git / svn^0Show build⌘F8Sync editor and PDF previewscf keyboard

Build / Debug I

⌘⇧BBuild and reload⌘⇧LLoad all (devtools)⇧F9Toggle breakpointF10Execute next line⇧F4Step into function⇧F6Finish function / loop⇧F5Continue⇧F8Stop debuggingscf keyboard

Source Control I

^⌥DDiff active source document^⌥MCommit changesSPACEStage / Unstage (Git)Stage / Unstage and move to next (Git)scf keyboard

Misc I

F7Check spelling⌘⌥F11Previous plot⌘⌥F12Next plot⌘⇧F10Restart R sessionachievement-star

Tag » How To Delete Code In R