Last active
June 4, 2024 16:48
-
-
Save alimbada/ab7ecdfee0cdb7a9f191b93463d24bb9 to your computer and use it in GitHub Desktop.
VS Code Keybindings (mostly inspired by Visual Studio with ReSharper & IntelliJ IDEA)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
// CamelHumps words | |
{ | |
"key": "ctrl+left", | |
"command": "cursorWordPartLeft", | |
"when": "textInputFocus" | |
}, | |
{ | |
"key": "ctrl+shift+left", | |
"command": "cursorWordPartLeftSelect", | |
"when": "textInputFocus" | |
}, | |
{ | |
"key": "ctrl+right", | |
"command": "cursorWordPartRight", | |
"when": "textInputFocus" | |
}, | |
{ | |
"key": "ctrl+shift+right", | |
"command": "cursorWordPartRightSelect", | |
"when": "textInputFocus" | |
}, | |
{ | |
"key": "ctrl+backspace", | |
"command": "deleteWordPartLeft", | |
"when": "textInputFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+delete", | |
"command": "deleteWordPartRight", | |
"when": "textInputFocus && !editorReadonly" | |
}, | |
// End CamelHumps words | |
{ | |
"key": "ctrl+shift+j", | |
"command": "editor.action.joinLines", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "shift+alt+l", | |
"command": "workbench.files.action.showActiveFileInExplorer", | |
"when": "editorFocus" | |
}, | |
{ | |
"key": "alt+enter", | |
"command": "editor.action.quickFix", | |
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+oem_period", | |
"command": "-editor.action.quickFix", | |
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+r ctrl+r", | |
"command": "editor.action.rename", | |
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "f2", | |
"command": "-editor.action.rename", | |
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+r ctrl+f", | |
"command": "editor.action.codeAction", | |
"args": { | |
"kind": "refactor.extract.field" | |
}, | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+r ctrl+m", | |
"command": "editor.action.codeAction", | |
"args": { | |
"kind": "refactor.extract.function" | |
}, | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+r ctrl+v", | |
"command": "editor.action.codeAction", | |
"args": { | |
"kind": "refactor.extract.variable" | |
}, | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+r ctrl+i", | |
"command": "editor.action.codeAction", | |
"args": { | |
"kind": "refactor.inline" | |
}, | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+k ctrl+d", | |
"command": "editor.action.formatChanges", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+0", | |
"command": "-workbench.action.focusSideBar" | |
}, | |
{ | |
"key": "ctrl+0", | |
"command": "workbench.action.zoomReset" | |
}, | |
{ | |
"key": "ctrl+numpad0", | |
"command": "-workbench.action.zoomReset" | |
}, | |
{ | |
"key": "ctrl+oem_minus", | |
"command": "-workbench.action.navigateBack", | |
"when": "canNavigateBack" | |
}, | |
{ | |
"key": "ctrl+alt+z", | |
"command": "git.revertSelectedRanges", | |
"when": "!editorReadonly && textInputFocus && activeEditorCanRevert" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment