Last active
August 24, 2022 20:39
-
-
Save sgoudham/f414582350fb9dc3cb01af184f000d0f to your computer and use it in GitHub Desktop.
VSCode - Keybindings
This file contains hidden or 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 defaults | |
| [ | |
| // Explorer - Functionality | |
| { | |
| "key": "l", | |
| "command": "workbench.explorer.fileView.focus", | |
| "when": "!editorFocus && !inputFocus" | |
| }, | |
| { | |
| "key": "a", | |
| "command": "explorer.newFile", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus" | |
| }, | |
| { | |
| "key": "shift+a", | |
| "command": "explorer.newFolder", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus" | |
| }, | |
| { | |
| "key": "y", | |
| "command": "filesExplorer.copy", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus" | |
| }, | |
| { | |
| "key": "x", | |
| "command": "filesExplorer.cut", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus" | |
| }, | |
| { | |
| "key": "p", | |
| "command": "filesExplorer.paste", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "key": "r", | |
| "command": "renameFile", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "key": "d", | |
| "command": "moveFileToTrash", | |
| "when": "explorerResourceMoveableToTrash && explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "key": "shift+d", | |
| "command": "deleteFile", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "key": "c", | |
| "command": "workbench.files.action.collapseExplorerFolders", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus" | |
| }, | |
| { | |
| "key": "s", | |
| "command": "explorer.openToSide", | |
| "when": "explorerViewletFocus && explorerViewletVisible && !inputFocus" | |
| }, | |
| { | |
| "key": "f", | |
| "command": "revealFileInOS", | |
| "when": "explorerViewletFocus && explorerViewletVisible && !inputFocus" | |
| }, | |
| { | |
| "key": "t", | |
| "command": "openInTerminal", | |
| "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus" | |
| }, | |
| { | |
| "key": "u", | |
| "command": "copyFilePath", | |
| "when": "explorerViewletFocus && explorerViewletVisible && !inputFocus" | |
| }, | |
| { | |
| "key": "i", | |
| "command": "copyRelativeFilePath", | |
| "when": "explorerViewletFocus& explorerViewletVisible && !inputFocus" | |
| }, | |
| { | |
| "key": "enter", | |
| "command": "list.select", | |
| "when": "explorerViewletFocus && explorerViewletVisible && !inputFocus" | |
| }, | |
| { | |
| "key": "alt+-", | |
| "command": "workbench.view.explorer", | |
| "when": "vim.active && vim.mode != 'Insert'" | |
| }, | |
| { | |
| "key": "alt+-", | |
| "command": "-workbench.view.explorer", | |
| "when": "explorerViewletVisible" | |
| }, | |
| { | |
| "key": "ctrl+n", | |
| "command": "workbench.action.toggleSidebarVisibility", | |
| "when": "vim.active && vim.mode != 'Insert'" | |
| }, | |
| // Terminal | |
| { | |
| "key": "ctrl+k", | |
| "command": "workbench.action.togglePanel" | |
| }, | |
| { | |
| "key": "alt+=", | |
| "command": "workbench.action.terminal.focus", | |
| "when": "vim.active && vim.mode != 'Insert'" | |
| }, | |
| { | |
| "key": "alt+=", | |
| "command": "workbench.action.focusActiveEditorGroup", | |
| "when": "terminalFocus" | |
| }, | |
| // Tabs/Editors | |
| { | |
| "key": "alt+q", | |
| "command": "workbench.action.closeActiveEditor" | |
| }, | |
| { | |
| "key": "alt+a", | |
| "command": "workbench.action.closeAllEditors" | |
| }, | |
| { | |
| "key": "alt+,", | |
| "command": "workbench.action.closeOtherEditors" | |
| }, | |
| // Page Navigation | |
| { | |
| "key": "alt+n", | |
| "command": "scrollLineDown", | |
| "when": "textInputFocus" | |
| }, | |
| { | |
| "key": "alt+p", | |
| "command": "scrollLineUp", | |
| "when": "textInputFocus" | |
| }, | |
| { | |
| "key": "alt+n", | |
| "command": "scrollPageDown", | |
| "when": "textInputFocus" | |
| }, | |
| { | |
| "key": "alt+p", | |
| "command": "scrollPageUp", | |
| "when": "textInputFocus" | |
| }, | |
| // Move Around Editors | |
| { | |
| "key": "ctrl+h", | |
| "command": "workbench.action.previousEditor", | |
| "when": "vim.active && vim.mode != 'Insert'" | |
| }, | |
| { | |
| "key": "ctrl+l", | |
| "command": "workbench.action.nextEditor", | |
| "when": "vim.active && vim.mode != 'Insert'" | |
| }, | |
| { | |
| "key": "alt+h", | |
| "command": "workbench.action.focusLeftGroup", | |
| "when": "editorTextFocus && vim.active && vim.mode != 'Insert'" | |
| }, | |
| { | |
| "key": "alt+l", | |
| "command": "workbench.action.focusRightGroup", | |
| "when": "editorTextFocus && vim.active && vim.mode != 'Insert'" | |
| }, | |
| { | |
| "key": "alt+k", | |
| "command": "workbench.action.focusAboveGroup", | |
| "when": "editorTextFocus && vim.active && vim.mode != 'Insert'" | |
| }, | |
| { | |
| "key": "alt+j", | |
| "command": "workbench.action.focusBelowGroup", | |
| "when": "editorTextFocus && vim.active && vim.mode != 'Insert'" | |
| }, | |
| // Down Motion | |
| { | |
| "key": "alt+j", | |
| "command": "selectNextSuggestion", | |
| "when": "suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "alt+j", | |
| "command": "workbench.action.quickOpenSelectNext", | |
| "when": "inQuickOpen" | |
| }, | |
| { | |
| "key": "alt+j", | |
| "command": "focusNextCodeAction", | |
| "when": "CodeActionMenuVisible" | |
| }, | |
| { | |
| "key": "j", | |
| "command": "focusNextCodeAction", | |
| "when": "CodeActionMenuVisible" | |
| }, | |
| // Up Motion | |
| { | |
| "key": "alt+k", | |
| "command": "selectPrevSuggestion", | |
| "when": "suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "alt+k", | |
| "command": "workbench.action.quickOpenSelectPrevious", | |
| "when": "inQuickOpen" | |
| }, | |
| { | |
| "key": "alt+k", | |
| "command": "focusPreviousCodeAction", | |
| "when": "CodeActionMenuVisible" | |
| }, | |
| { | |
| "key": "k", | |
| "command": "focusPreviousCodeAction", | |
| "when": "CodeActionMenuVisible" | |
| }, | |
| // LSP | |
| { | |
| "key": "shift+k", | |
| "command": "editor.action.showDefinitionPreviewHover", | |
| "when": "editorTextFocus" | |
| } | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment