feat(vscode): Keymaps and extension keymaps

This commit is contained in:
js0ny 2025-02-14 21:11:38 +00:00
parent b4030c469e
commit 0803e9d8b2
2 changed files with 507 additions and 131 deletions

View file

@ -1,13 +1,13 @@
{
"vspacecode.bindings": [
{
{ // SPC
"key": " ",
"name": "Find Files",
"icon": "search",
"type": "command",
"command": "workbench.action.quickOpen"
},
{
{ // TAB
"key": "\t",
"name": "Last buffer",
"icon": "go-to-file",
@ -17,21 +17,21 @@
"list.select"
]
},
{
{ // !
"key": "!",
"name": "Show terminal",
"icon": "terminal",
"type": "command",
"command": "workbench.action.terminal.focus"
},
{
{ // "
"key": "\"",
"name": "Open new external terminal",
"icon": "chevron-right",
"type": "command",
"command": "workbench.action.terminal.openNativeConsole"
},
{
{ // $
"key": "$",
"name": "Run Recent Command in Terminal",
"icon": "terminal",
@ -283,6 +283,13 @@
"icon": "file",
"type": "bindings",
"bindings": [
{
"key": "D",
"name": "Close window",
"icon": "close",
"type": "command",
"command": "workbench.action.closeOtherEditors"
},
{
"key": "0",
"name": "Last buffer in window",
@ -290,6 +297,13 @@
"type": "command",
"command": "workbench.action.lastEditorInGroup"
},
{
"key": "f",
"name": "Built-in Find in buffer",
"icon": "search",
"type": "command",
"command": "actions.find"
},
{
"key": "1",
"name": "First buffer in window",
@ -908,6 +922,13 @@
}
]
},
{
"key": "E",
"name": "Focus on error",
"icon": "error",
"type": "command",
"command": "workbench.actions.view.problems"
},
{
"key": "e",
"name": "Show error",
@ -1080,7 +1101,7 @@
"name": "Open extension view",
"icon": "extensions",
"type": "command",
"command": "workbench.files.action.showActiveFileInExplorer"
"command": "workbench.view.extensions"
},
{
"key": "T",
@ -1280,7 +1301,7 @@
"name": "Blame file",
"icon": "file",
"type": "command",
"command": "magit.blame-file"
"command": "gitlens.toggleFileBlame"
},
{
"key": "c",
@ -1393,7 +1414,7 @@
},
{
"key": "a",
"name": "+Append/Insert",
"name": "+Append/Insert/AI",
"icon": "add",
"type": "bindings",
"bindings": [
@ -1418,33 +1439,25 @@
"type": "command",
"command": "insertDateString.insertOwnFormatDateTime"
},
{
"key": "c",
"name": "+Cursor",
"icon": "cursor",
"type": "transient",
"bindings": [
{
"key": "c",
"name": "Insert cursor below",
"icon": "triangle-down",
"type": "command",
"command": "editor.action.insertCursorBelow"
},
{
"key": "C",
"name": "Insert cursor above",
"icon": "triangle-up",
"type": "command",
"command": "editor.action.insertCursorAbove"
}
]
},
{
"key": "A",
"name": "Insert cursor at end of each line selected",
"icon": "triangle-right",
"command": "editor.action.insertCursorAtEndOfEachLineSelected"
},
{
"key": "c",
"name": "Copilot Chat",
"icon": "ai",
"type": "command",
"command": "workbench.panel.chat"
},
{
"key": "e",
"name": "Copilot Edit",
"icon": "ai",
"type": "command",
"command": "workbench.panel.chatEditing"
}
]
},
@ -2154,10 +2167,10 @@
},
{
"key": "x",
"name": "Close current window",
"name": "Close all windows",
"icon": "close-all",
"type": "command",
"command": "workbench.action.closeEditorsInGroup"
"command": "workbench.action.closeAllGroups"
},
{
"key": "z",

View file

@ -1,17 +1,11 @@
// Place your key bindings in this file to override the defaultsauto[]
[
// #region quickOpen (Telescope)
{ // <leader> <space> Telescope emulator
"key": "space space",
"command": "workbench.action.quickOpen",
"when": "!editorFocus && !inputFocus"
},
{
"key": "ctrl+p",
"command": "workbench.action.quickOpen"
},
{
"key": "ctrl+e",
"key": "ctrl+p",
"command": "workbench.action.quickOpenNavigatePrevious",
"when": "inQuickOpen"
},
@ -25,8 +19,17 @@
"command": "workbench.action.closeQuickOpen",
"when": "inQuickOpen"
},
{ // Emacs-like
"key": "ctrl+g",
"command": "workbench.action.closeQuickOpen",
"when": "inQuickOpen"
},
{ // Emacs-like: M-x to show command palette
"key": "alt+x",
"command": "workbench.action.showCommands"
},
// #endregion
// #region plugin: code runner
// #region Extension: Code Runner
{
"key": "ctrl+alt+n",
"command": "-code-runner.run"
@ -64,55 +67,6 @@
"when": "github.copilot.activated && github.copilot.panelVisible"
},
// #endregion
{
"key": "f9",
"command": "csdevkit.debug.noDebugFileLaunch"
},
{
"key": "ctrl+h",
"command": "-editor.action.startFindReplaceAction",
"when": "editorFocus || editorIsOpen"
},
{
"key": "ctrl+h",
"command": "-extension.vim_ctrl+h",
"when": "editorTextFocus && vim.active && vim.use<C-h> && !inDebugRepl"
},
{
"key": "ctrl+r",
"command": "-workbench.action.reloadWindow",
"when": "isDevelopment"
},
{
"key": "ctrl+alt+r",
"command": "-workbench.action.terminal.runRecentCommand",
"when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled"
},
{
"key": "ctrl+r",
"command": "-workbench.action.terminal.runRecentCommand",
"when": "accessibilityModeEnabled && terminalFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalFocus && terminalProcessSupported || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'"
},
{
"key": "ctrl+shift+r",
"command": "-rerunSearchEditorSearch",
"when": "inSearchEditor"
},
{
"key": "ctrl+shift+r",
"command": "-editor.action.refactor",
"when": "editorHasCodeActionsProvider && textInputFocus && !editorReadonly"
},
{
"key": "ctrl+shift+r",
"command": "-workbench.action.quickOpenNavigatePreviousInRecentFilesPicker",
"when": "inQuickOpen && inRecentFilesPicker"
},
{
"key": "ctrl+e",
"command": "cursorEnd",
"when": "textInputFocus"
},
// #region Nvim-Tree like File Explorer
// n, e : move cursor up/down
// h : move cursor to parent folder
@ -253,26 +207,6 @@
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
// #endregion
{
"key": "ctrl+p",
"command": "workbench.action.files.openFileFolder",
"when": "isMacNative && openFolderWorkspaceSupport"
},
{
"key": "ctrl+o",
"command": "-workbench.action.files.openFileFolder",
"when": "isMacNative && openFolderWorkspaceSupport"
},
{
"key": "ctrl+p",
"command": "-extension.vim_ctrl+p",
"when": "editorTextFocus && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
},
{
"key": "ctrl+o",
"command": "-workbench.action.files.openFolderViaWorkspace",
"when": "!openFolderWorkspaceSupport && workbenchState == 'workspace'"
},
// #region Vim-like Hover Browsing
{
"key": "h",
@ -317,6 +251,12 @@
"when": "editorTextFocus && inputFocus && notebookEditorFocused && vim.mode == 'Normal' && notebookEditorCursorAtBoundary != 'bottom' && notebookEditorCursorAtBoundary != 'none'"
},
// #endregion
// #region Git / Source Control
// { // Alt+Enter: Send Commit when editing commit message
// "key": "alt+enter",
// "command": "git.commitMessageAccept",
// "when": "editorLangId=\"git-commit\""
// },
{
"key": "ctrl+shift+g c",
"command": "-gitlens.showQuickCommitFileDetails",
@ -356,7 +296,8 @@
"key": "ctrl+l c",
"command": "-extension.copyGitHubLinkToClipboard"
},
// #region Use ^n ^e to navigate completions
// #endregion
// #region Use ^pbnf to navigate completions
{
"key": "ctrl+n",
"command": "workbench.action.files.newUntitledFile",
@ -372,45 +313,75 @@
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
},
{
"key": "ctrl+e",
"key": "ctrl+p",
"command": "selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
},
{
"key": "ctrl+f",
"command": "acceptSelectedSuggestion",
"when": "suggestWidgetVisible && textInputFocus && !inlineSuggestionVisible"
},
{
"key": "alt+f",
"command": "editor.action.inlineSuggest.commit",
"when": "inlineSuggestionVisible && textInputFocus"
},
{
"key": "ctrl+f",
"command": "editor.action.inlineSuggest.acceptNextWord",
"when": "inlineSuggestionVisible && textInputFocus"
},
{
"key": "ctrl+b",
"command": "hideSuggestWidget",
"when": "suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+b",
"command": "editor.action.inlineSuggest.hide",
"when": "inlineSuggestionVisible && textInputFocus"
},
// #endregion
// #region Terminal Control, use ^a as prefix / leader key
// tmux-like terminal control
{ // prefix + x : kill terminal
"key": "ctrl+q x",
"key": "ctrl+a space",
"command": "vspacecode.space",
"when": "terminalFocus"
},
{ // prefix + x : kill terminal
"key": "ctrl+a x",
"command": "workbench.action.terminal.kill",
"when": "terminalFocus"
},
{ // prefix + c : create new terminal
"key": "ctrl+q c",
"key": "ctrl+a c",
"command": "workbench.action.terminal.new",
"when": "terminalFocus"
},
{ // prefix + | : split terminal vertically
"key": "ctrl+q shift+\\",
"key": "ctrl+a shift+\\",
"command": "workbench.action.terminal.split",
"when": "terminalFocus"
},
{ // prefix + \ : split terminal vertically
"key": "ctrl+q \\",
"key": "ctrl+a \\",
"command": "workbench.action.terminal.split",
"when": "terminalFocus"
},
{ // prefix + / : search
"key": "ctrl+q /",
"key": "ctrl+a /",
"command": "workbench.action.terminal.focusFind",
"when": "terminalFocus"
},
{ // prefix + t : toggle terminal
"key": "ctrl+q t",
"key": "ctrl+a t",
"command": "workbench.action.terminal.toggleTerminal",
"when": "terminalFocus"
},
{ // prefix + ^a: show information
"key": "ctrl+q ctrl+q",
"key": "ctrl+a ctrl+a",
"command": "workbench.action.terminal.focusHover",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
},
@ -420,22 +391,22 @@
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
},
{ // prefix + 1 : focus terminal 1
"key": "ctrl+q 1",
"key": "ctrl+a 1",
"command": "workbench.action.terminal.focusAtIndex1",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
},
{ // prefix + 2 : focus terminal 2
"key": "ctrl+q 2",
"key": "ctrl+a 2",
"command": "workbench.action.terminal.focusAtIndex2",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
},
{ // prefix + 3 : focus terminal 3
"key": "ctrl+q 3",
"key": "ctrl+a 3",
"command": "workbench.action.terminal.focusAtIndex3",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalIsOpen || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalTabsFocus || terminalIsOpen && terminalTabsFocus || terminalProcessSupported && terminalTabsFocus"
},
{ // prefix + g : Go to recent directory
"key": "ctrl+q g",
"key": "ctrl+a g",
"command": "workbench.action.terminal.goToRecentDirectory",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
@ -445,43 +416,435 @@
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{ // prefix + d : detach terminal
"key": "ctrl+q d",
"key": "ctrl+a d",
"command": "workbench.action.terminal.detachSession",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{ // prefix + a : attach to session
"key": "ctrl+q a",
"key": "ctrl+a a",
"command": "workbench.action.terminal.attachToSession",
"when": "terminalFocus"
},
{
"key": "ctrl+q h",
"key": "ctrl+a h",
"command": "workbench.action.terminal.focusPreviousPane",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "ctrl+q i",
"key": "ctrl+a i",
"command": "workbench.action.terminal.focusNextPane",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "ctrl+q shift+H",
"key": "ctrl+a shift+H",
"command": "workbench.action.terminal.resizePaneLeft",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "ctrl+q shift+N",
"key": "ctrl+a shift+N",
"command": "workbench.action.terminal.resizePaneDown",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "ctrl+q shift+E",
"key": "ctrl+a shift+E",
"command": "workbench.action.terminal.resizePaneUp",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "ctrl+q shift+I",
"key": "ctrl+a shift+I",
"command": "workbench.action.terminal.resizePaneRight",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
}
},
// #endregion
// #region Misc
{
"key": "ctrl+p",
"command": "workbench.action.files.openFileFolder",
"when": "isMacNative && openFolderWorkspaceSupport"
},
{
"key": "ctrl+o",
"command": "-workbench.action.files.openFileFolder",
"when": "isMacNative && openFolderWorkspaceSupport"
},
{
"key": "ctrl+p",
"command": "-extension.vim_ctrl+p",
"when": "editorTextFocus && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
},
{
"key": "ctrl+o",
"command": "-workbench.action.files.openFolderViaWorkspace",
"when": "!openFolderWorkspaceSupport && workbenchState == 'workspace'"
},
{
"key": "f9",
"command": "csdevkit.debug.noDebugFileLaunch"
},
{
"key": "ctrl+h",
"command": "-editor.action.startFindReplaceAction",
"when": "editorFocus || editorIsOpen"
},
{
"key": "ctrl+h",
"command": "-extension.vim_ctrl+h",
"when": "editorTextFocus && vim.active && vim.use<C-h> && !inDebugRepl"
},
{
"key": "ctrl+r",
"command": "-workbench.action.reloadWindow",
"when": "isDevelopment"
},
{
"key": "ctrl+alt+r",
"command": "-workbench.action.terminal.runRecentCommand",
"when": "terminalFocus && terminalHasBeenCreated && !accessibilityModeEnabled || terminalFocus && terminalProcessSupported && !accessibilityModeEnabled"
},
{
"key": "ctrl+r",
"command": "-workbench.action.terminal.runRecentCommand",
"when": "accessibilityModeEnabled && terminalFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalFocus && terminalProcessSupported || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'"
},
{
"key": "ctrl+shift+r",
"command": "-rerunSearchEditorSearch",
"when": "inSearchEditor"
},
{
"key": "ctrl+shift+r",
"command": "-editor.action.refactor",
"when": "editorHasCodeActionsProvider && textInputFocus && !editorReadonly"
},
{
"key": "ctrl+shift+r",
"command": "workbench.action.quickOpenNavigatePreviousInRecentFilesPicker",
"when": "inQuickOpen && inRecentFilesPicker"
},
{
"key": "ctrl+shift+l",
"command": "cursorLineStart",
"when": "textInputFocus"
},
{
"key": "space",
"command": "vspacecode.space",
"when": "activeEditorGroupEmpty && focusedView == '' && !whichkeyActive && !inputFocus"
},
{
"key": "space",
"command": "vspacecode.space",
"when": "sideBarFocus && !inputFocus && !whichkeyActive"
},
{
"key": "tab",
"command": "extension.vim_tab",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert' && editorLangId != 'magit'"
},
{
"key": "tab",
"command": "-extension.vim_tab",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
},
{
"key": "x",
"command": "magit.discard-at-point",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{
"key": "k",
"command": "-magit.discard-at-point"
},
{
"key": "-",
"command": "magit.reverse-at-point",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{
"key": "v",
"command": "-magit.reverse-at-point"
},
{
"key": "shift+-",
"command": "magit.reverting",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{
"key": "shift+v",
"command": "-magit.reverting"
},
{
"key": "shift+o",
"command": "magit.resetting",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{
"key": "shift+x",
"command": "-magit.resetting"
},
{
"key": "x",
"command": "-magit.reset-mixed"
},
{
"key": "ctrl+u x",
"command": "-magit.reset-hard"
},
{
"key": "y",
"command": "-magit.show-refs"
},
{
"key": "y",
"command": "vspacecode.showMagitRefMenu",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode == 'Normal'"
},
{
"key": "g",
"command": "-magit.refresh",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{
"key": "g",
"command": "vspacecode.showMagitRefreshMenu",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{
"key": "ctrl+j",
"command": "workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
},
{
"key": "ctrl+k",
"command": "workbench.action.quickOpenSelectPrevious",
"when": "inQuickOpen"
},
{
"key": "ctrl+j",
"command": "selectNextSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+k",
"command": "selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+l",
"command": "acceptSelectedSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
"key": "ctrl+j",
"command": "showNextParameterHint",
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible"
},
{
"key": "ctrl+k",
"command": "showPrevParameterHint",
"when": "editorFocus && parameterHintsMultipleSignatures && parameterHintsVisible"
},
{
"key": "ctrl+j",
"command": "selectNextCodeAction",
"when": "codeActionMenuVisible"
},
{
"key": "ctrl+k",
"command": "selectPrevCodeAction",
"when": "codeActionMenuVisible"
},
{
"key": "ctrl+l",
"command": "acceptSelectedCodeAction",
"when": "codeActionMenuVisible"
},
{
"key": "ctrl+h",
"command": "file-browser.stepOut",
"when": "inFileBrowser"
},
{
"key": "ctrl+l",
"command": "file-browser.stepIn",
"when": "inFileBrowser"
},
{
"key": "ctrl+oem_4",
"command": "whichkey.undoKey",
"when": "whichkeyVisible"
},
{
"key": "alt+e",
"command": "editor.action.insertCursorAbove",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+up",
"command": "-editor.action.insertCursorAbove",
"when": "editorTextFocus"
},
{
"key": "alt+n",
"command": "editor.action.insertCursorBelow",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+down",
"command": "-editor.action.insertCursorBelow",
"when": "editorTextFocus"
},
// #endregion
// #region Ctrl+W Remaps (Vim-like)
{
"key": "ctrl+w h",
"command": "workbench.action.navigateLeft"
},
{
"key": "ctrl+w ctrl+h",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "ctrl+w i",
"command": "workbench.action.navigateRight"
},
{
"key": "ctrl+w ctrl+i",
"command": "workbench.action.toggleAuxiliaryBar"
},
{
"key": "ctrl+w n",
"command": "workbench.action.navigateDown"
},
{
"key": "ctrl+w ctrl+n",
"command": "workbench.action.togglePanel"
},
{
"key": "ctrl+w e",
"command": "workbench.action.navigateUp"
},
{ // original ^w
"key": "ctrl+w ctrl+w",
"command": "workbench.action.closeActiveEditor",
"when": "editorFocus || inSettingsEditor || inKeybindings || inWelcome"
},
{ // :only
"key": "ctrl+w o",
"command": "runCommands",
"args": {
"commands": [
"workbench.action.joinAllGroups",
"workbench.action.maximizeEditorHideSidebar"
]
}
},
{
"key": "ctrl+w ctrl+w",
"command": "workbench.action.closeGroup",
"when": "activeEditorGroupEmpty && multipleEditorGroups"
},
{
"key": "ctrl+w",
"command": "-workbench.action.closeGroup",
"when": "activeEditorGroupEmpty && multipleEditorGroups"
},
// #endregion
// #region Emacs like Cursor Movement
{
"key": "ctrl+f",
"command": "cursorRight",
"when": "textInputFocus && !inlineEditIsVisible && !suggestWidgetVisible && !inlineSuggestionVisible"
},
{
"key": "ctrl+b",
"command": "cursorLeft",
"when": "textInputFocus && !inlineEditIsVisible && !suggestWidgetVisible && !inlineSuggestionVisible"
},
{
"key": "ctrl+n",
"command": "cursorDown",
"when": "textInputFocus && !suggestWidgetVisible && !inQuickOpen"
},
{
"key": "ctrl+p",
"command": "cursorUp",
"when": "textInputFocus && !suggestWidgetVisible && !inQuickOpen"
},
{
"key": "ctrl+a",
"command": "cursorHome",
"when": "textInputFocus"
},
{
"key": "ctrl+shift+a",
"command": "cursorEnd",
"when": "editor.action.selectAll"
},
{
"key": "ctrl+k ctrl+a",
"command": "editor.action.selectAll"
},
{
"key": "ctrl+e",
"command": "cursorEnd",
"when": "textInputFocus"
},
{
"key": "alt+b",
"command": "cursorWordStartLeft",
"when": "textInputFocus"
},
{
"key": "alt+f",
"command": "cursorWordStartRight",
"when": "textInputFocus && !inlineEditIsVisible && !suggestWidgetVisible && !inlineSuggestionVisible"
},
// #endregion
{
"key": "alt+q",
"command": "vspacecode.space"
},
// #region Search View
{ // Focus on search list, therefore can use n/e to move up/down
"key": "escape",
"command": "search.action.focusSearchList",
"when": "searchViewletFocus && inputBoxFocus"
},
{ // Focus on main input box
"key": "l",
"command": "workbench.action.replaceInFiles",
"when": "searchViewletFocus && !inputBoxFocus"
},
{
"key": "r",
"command": "toggleSearchRegex",
"when": "searchViewletFocus && !inputBoxFocus"
},
{
"key": "w",
"command": "toggleSearchWholeWord",
"when": "searchViewletFocus && !inputBoxFocus"
},
{
"key": "c",
"command": "toggleSearchCaseSensitive",
"when": "searchViewletFocus && !inputBoxFocus"
},
{
"key": "p",
"command": "toggleSearchPreserveCase",
"when": "searchViewletFocus && !inputBoxFocus"
},
{
"key": "i",
"command": "search.action.focusFilesToInclude",
"when": "searchViewletFocus && !inputBoxFocus"
},
{
"key": "shift+e",
"command": "search.action.focusFilesToExclude",
"when": "searchViewletFocus && !inputBoxFocus"
}
// #endregion
]