Skip to content

Commit cb1af90

Browse files
authored
Make r.sourceCurrentFileWithEcho the default "Run" command in R files with the same keybinding as RStudio (#9238)
Addresses #9129 We originally made this behavior consistent between Python and R, but we have had multiple reports of surprise by the behavior for R since the RStudio behavior is so ingrained for folks. We're going to try it this way now. ### Release Notes #### New Features - R: The keyboard shortcuts for _R: Source R File_ and _R: Source R File with Echo_ are now consistent with RStudio's defaults. #### Bug Fixes - N/A ### QA Notes The example from #9129 is a good one to use. After this PR, the default (first) option in the "Run" menu is now _with_ echo and we have the same keyboard shortcuts as RStudio: <kbd>Cmd/Ctrl+Shift+S</kbd> for without echo and <kbd>Cmd/Ctrl+Shift+Enter</kbd> for with echo.
1 parent 5d27eb5 commit cb1af90

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

extensions/positron-r/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@
488488
"when": "isRPackage"
489489
},
490490
{
491-
"command": "r.sourceCurrentFile",
491+
"command": "r.sourceCurrentFileWithEcho",
492492
"key": "ctrl+shift+enter",
493493
"mac": "cmd+shift+enter",
494494
"when": "editorLangId == r && !isRPackage && !positron.hasCodeCells"
@@ -607,17 +607,17 @@
607607
],
608608
"editor/title/run": [
609609
{
610-
"command": "r.sourceCurrentFile",
610+
"command": "r.sourceCurrentFileWithEcho",
611611
"group": "navigation@0",
612612
"icon": "$(play)",
613-
"title": "%r.command.sourceCurrentFile.title%",
613+
"title": "%r.command.sourceCurrentFileWithEcho.title%",
614614
"when": "resourceLangId == r && !isInDiffEditor && !isRPackage"
615615
},
616616
{
617-
"command": "r.sourceCurrentFileWithEcho",
618-
"group": "navigation@0",
617+
"command": "r.sourceCurrentFile",
618+
"group": "navigation@1",
619619
"icon": "$(play)",
620-
"title": "%r.command.sourceCurrentFileWithEcho.title%",
620+
"title": "%r.command.sourceCurrentFile.title%",
621621
"when": "resourceLangId == r && !isInDiffEditor && !isRPackage"
622622
},
623623
{

0 commit comments

Comments
 (0)