You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please make the refactorings contribute VSCode Commands so that users can configure shortcuts for them and preserve our state of flow, instead of having to use the context menu.
I spent an hour trying to find these commands because I couldn't believe they didn't exist.
Environment
Operating System: Ubuntu
JDK version: 21
Visual Studio Code version: 1.85.1
Java extension version: 1.25.1
Steps To Reproduce
Open the Keyboard Shortcuts View
Search for "Inline Local Variable" (or any other refactoring)
Current Result
No Java refactoring action appears.
Expected Result
A Java refactoring action should appear, so that we can configure a shortcut for it.
The text was updated successfully, but these errors were encountered:
In your VS Code custom keybindings file, which can be accessed by clicking the "Open Keyboard Shortcuts (JSON)" button from the Keyboard Shortcuts preference page :
$HOME/.confg/Code/User/keybindings.json
// Place your key bindings in this file to override the defaultsauto[]
[
{
"command": "editor.action.codeAction",
"when": "editorTextFocus",
"args": {
"kind": "refactor.inline"
},
"key": "alt+shift+i"
}
]
You should see it show up in the Keyboard Shortcut preference page (and set the key to whatever you prefer) and it should work as expected. The only tricky part is figuring out what the kind is for the refactoring. There's no well documented place for this, but for now you can use :
rgrunber
changed the title
[Feature Request] Keyboard shortcut for each refactoring
Automatically create keyboard shortcuts for each refactoring
Jan 12, 2024
Please make the refactorings contribute VSCode Commands so that users can configure shortcuts for them and preserve our state of flow, instead of having to use the context menu.
I spent an hour trying to find these commands because I couldn't believe they didn't exist.
Environment
Steps To Reproduce
Current Result
No Java refactoring action appears.
Expected Result
A Java refactoring action should appear, so that we can configure a shortcut for it.
The text was updated successfully, but these errors were encountered: