-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dedicated RStudio keymap #669
Comments
Another common binding the RStudio keymap could override is F1, which shows the Command Palette in VS Code but brings up Help in RStudio. |
|
|
|
Plus Cmd Shift D - Document Package (VS Code binding: Show Run, i.e. These package development ones are probably the ones our earliest users will miss the most. |
Adding in that a pipe keybinding would be nice as well! |
|
Another is Cmd Shift N, which opens a new window in VS Code but should open a new tab if RStudio bindings are active. https://positpbc.slack.com/archives/C05M2EZCPGR/p1695325876348719 |
Another is F2 which is Rename in VS Code but Go To Symbol in RStudio. |
In Positron 2024.01.0 (Universal) build 176, I can opt in to and then use the RStudio keymap: keymap.movI think as part of #1487 we should improve how this setting is surfaced in the UI because that's kind of weird/awkward: |
Generally speaking, we want Positron to have VS Code-like keybindings, because its heritage as a VS Code based IDE is clear (it looks like VS Code, so people will expect it to act like VS Code) and (statistically) it is more likely that new Positron users will be coming from VS Code than any other IDE.
However, we also want to honor users coming from RStudio. Towards that end, we should create an RStudio keymap that brings most of RStudio's shortcuts to Positron, removing any default VS Code bindings that conflict.
For example (noted by @DavisVaughan), in RStudio, Comment Selection is Cmd + Shift + C, but in VS Code that combination opens a new external terminal. With the RStudio Keymap activated, the RStudio behavior will take precedence.
For another example: in VS Code, Ctrl + 1 and Ctrl + 2 activate the first and second editor tabs, respectively. In RStudio, they switch between the Source and Console panes. These commands should exist in Positron, but we probably don't want to stomp on VS Code's keybindings -- unless the user has opted into RStudio compatible keymaps.
This behavior should probably not be implemented in the Positron core but instead be implemented as an RStudio keymap extension.
https://code.visualstudio.com/docs/getstarted/keybindings#_keymap-extensions
This extension should be bundled with Positron and we'll probably also want some kind of way to activate it that is more obvious than VS Code's "load keymap" command.
The text was updated successfully, but these errors were encountered: