更新 'keybindings.json'

This commit is contained in:
colin 2020-10-14 17:34:53 +08:00
parent 81882170fc
commit 5354de8898
1 changed files with 107 additions and 102 deletions

View File

@ -1,181 +1,186 @@
// Place your key bindings in this file to override the defaultsauto[] // Place your key bindings in this file to override the defaultsauto[]
[ [
{ {
"key": "ctrl+-", "key": "cmd+-",
"command": "editor.fold", "command": "editor.fold",
}, },
{ {
"key": "ctrl+=", "key": "cmd+=",
"command": "editor.unfoldRecursively", "command": "editor.unfoldRecursively",
}, },
{ {
"key": "ctrl+shift+-", "key": "cmd+shift+-",
"command": "editor.foldAll", "command": "editor.foldAll",
}, },
{ {
"key": "ctrl+shift+=", "key": "cmd+shift+=",
"command": "editor.unfoldAll", "command": "editor.unfoldAll",
}, },
{ {
"key": "ctrl+d", "key": "cmd+d",
"command": "editor.action.revealDefinition", "command": "editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
}, },
{ {
"key": "ctrl+w", "key": "shift+cmd+t",
"command": "workbench.action.closeWindow",
"when": "!multipleEditorGroups && !inDebugMode"
},
{
"key": "cmd+w",
"command": "workbench.action.closeWindow", "command": "workbench.action.closeWindow",
"when": "!editorIsOpen && !multipleEditorGroups" "when": "!editorIsOpen && !multipleEditorGroups"
}, },
{ {
"key": "ctrl+c", "key": "cmd+c",
"command": "editor.action.clipboardCopyAction", "command": "editor.action.clipboardCopyAction",
"when": "textInputFocus" "when": "textInputFocus"
}, },
{ {
"key": "ctrl+x", "key": "cmd+x",
"command": "editor.action.clipboardCutAction", "command": "editor.action.clipboardCutAction",
"when": "textInputFocus && !editorReadonly" "when": "textInputFocus && !editorReadonly"
}, },
{ {
"key": "ctrl+f", "key": "cmd+f",
"command": "actions.find" "command": "actions.find"
}, },
{ {
"key": "ctrl+n", "key": "cmd+n",
"command": "editor.action.nextMatchFindAction", "command": "editor.action.nextMatchFindAction",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+shift+l", "key": "cmd+shift+l",
"command": "editor.action.formatSelection", "command": "editor.action.formatSelection",
"when": "editorHasDocumentSelectionFormattingProvider && editorHasDocumentSelectionFormattingProvider && editorTextFocus && !editorReadonly" "when": "editorHasDocumentSelectionFormattingProvider && editorHasDocumentSelectionFormattingProvider && editorTextFocus && !editorReadonly"
}, },
{ {
"key": "ctrl+g", "key": "cmd+g",
"command": "workbench.action.gotoLine" "command": "workbench.action.gotoLine"
}, },
{ {
"key": "ctrl+/", "key": "cmd+/",
"command": "editor.action.commentLine", "command": "editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly" "when": "editorTextFocus && !editorReadonly"
}, },
{ {
"key": "ctrl+2", "key": "cmd+2",
"command": "workbench.action.focusSecondEditorGroup" "command": "workbench.action.focusSecondEditorGroup"
}, },
{ {
"key": "ctrl+1", "key": "cmd+1",
"command": "workbench.action.focusFirstEditorGroup" "command": "workbench.action.focusFirstEditorGroup"
}, },
{ {
"key": "ctrl+b", "key": "cmd+b",
"command": "workbench.action.toggleSidebarVisibility" "command": "workbench.action.toggleSidebarVisibility"
}, },
{ {
"key": "ctrl+p", "key": "cmd+p",
"command": "workbench.action.quickOpen" "command": "workbench.action.quickOpen"
}, },
{ {
"key": "ctrl+v", "key": "cmd+v",
"command": "editor.action.clipboardPasteAction", "command": "editor.action.clipboardPasteAction",
"when": "textInputFocus && !editorReadonly" "when": "textInputFocus && !editorReadonly"
}, },
{ {
"key": "ctrl+shift+f", "key": "cmd+shift+f",
"command": "workbench.action.findInFiles" "command": "workbench.action.findInFiles"
}, },
{ {
"key": "ctrl+z", "key": "cmd+z",
"command": "undo", "command": "undo",
"when": "textInputFocus && !editorReadonly" "when": "textInputFocus && !editorReadonly"
}, },
{ {
"key": "ctrl+shift+z", "key": "cmd+shift+z",
"command": "redo", "command": "redo",
"when": "textInputFocus && !editorReadonly" "when": "textInputFocus && !editorReadonly"
}, },
{ {
"key": "ctrl+j", "key": "cmd+j",
"command": "cursorDown", "command": "cursorDown",
"when": "textInputFocus" "when": "textInputFocus"
}, },
{ {
"key": "ctrl+k", "key": "cmd+k",
"command": "cursorUp", "command": "cursorUp",
"when": "textInputFocus" "when": "textInputFocus"
}, },
{ {
"key": "ctrl+h", "key": "cmd+h",
"command": "cursorLeft", "command": "cursorLeft",
"when": "textInputFocus" "when": "textInputFocus"
}, },
{ {
"key": "ctrl+l", "key": "cmd+l",
"command": "cursorRight", "command": "cursorRight",
"when": "textInputFocus" "when": "textInputFocus"
}, },
{ {
"key": "ctrl+shift+j", "key": "cmd+shift+j",
"command": "workbench.action.search.toggleQueryDetails", "command": "workbench.action.search.toggleQueryDetails",
"when": "searchViewletVisible" "when": "searchViewletVisible"
}, },
{ {
"key": "ctrl+,", "key": "cmd+,",
"command": "workbench.action.openSettings" "command": "workbench.action.openSettings"
}, },
{ {
"key": "ctrl+shift+tab", "key": "cmd+shift+tab",
"command": "workbench.action.openPreviousRecentlyUsedEditorInGroup" "command": "workbench.action.openPreviousRecentlyUsedEditorInGroup"
}, },
{ {
"key": "ctrl+shift+r", "key": "cmd+shift+r",
"command": "workbench.action.reopenClosedEditor" "command": "workbench.action.reopenClosedEditor"
}, },
{ {
"key": "ctrl+[", "key": "cmd+[",
"command": "workbench.action.navigateBack" "command": "workbench.action.navigateBack"
}, },
{ {
"key": "ctrl+]", "key": "cmd+]",
"command": "workbench.action.navigateForward" "command": "workbench.action.navigateForward"
}, },
{ {
"key": "ctrl+e", "key": "cmd+e",
"command": "workbench.action.togglePanel", "command": "workbench.action.togglePanel",
"when": "activePanel" "when": "activePanel"
}, },
{ {
"key": "ctrl+e", "key": "cmd+e",
"command": "macros.terminal", "command": "workbench.action.toggleMaximizedPanel",
"when": "!activePanel" "when": "!activePanel"
}, },
{ {
"key": "ctrl+n", "key": "cmd+n",
"command": "workbench.action.terminal.findNext", "command": "workbench.action.terminal.findNext",
"when": "terminalFocus || terminalFindWidgetFocused" "when": "terminalFindFocused || terminalFocus"
}, },
{ {
"key": "ctrl+shift+n", "key": "cmd+shift+n",
"command": "workbench.action.terminal.findPrevious", "command": "workbench.action.terminal.findPrevious",
"when": "terminalFocus || terminalFindWidgetFocused" "when": "terminalFindFocused || terminalFocus"
}, },
{ {
"key": "ctrl+t", "key": "cmd+t",
"command": "workbench.action.terminal.newInActiveWorkspace", "command": "workbench.action.terminal.newInActiveWorkspace",
"when": "terminalFocus" "when": "terminalFocus"
}, },
{ {
"key": "ctrl+w", "key": "cmd+w",
"command": "workbench.action.terminal.kill", "command": "workbench.action.terminal.kill",
"when": "terminalFocus" "when": "terminalFocus"
}, },
{ {
"key": "ctrl+shift+]", "key": "cmd+shift+]",
"command": "workbench.action.terminal.focusNext", "command": "workbench.action.terminal.focusNext",
"when": "terminalFocus" "when": "terminalFocus"
}, },
{ {
"key": "ctrl+shift+[", "key": "cmd+shift+[",
"command": "workbench.action.terminal.focusPrevious", "command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus" "when": "terminalFocus"
}, },
@ -184,209 +189,209 @@
"command": "search.action.clearSearchResults" "command": "search.action.clearSearchResults"
}, },
{ {
"key": "ctrl+shift+n", "key": "cmd+shift+n",
"command": "editor.action.previousMatchFindAction", "command": "editor.action.previousMatchFindAction",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+1", "key": "cmd+1",
"command": "workbench.action.openEditorAtIndex1", "command": "workbench.action.openEditorAtIndex1",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+2", "key": "cmd+2",
"command": "workbench.action.openEditorAtIndex2", "command": "workbench.action.openEditorAtIndex2",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+3", "key": "cmd+3",
"command": "workbench.action.openEditorAtIndex3", "command": "workbench.action.openEditorAtIndex3",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+4", "key": "cmd+4",
"command": "workbench.action.openEditorAtIndex4", "command": "workbench.action.openEditorAtIndex4",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+5", "key": "cmd+5",
"command": "workbench.action.openEditorAtIndex5", "command": "workbench.action.openEditorAtIndex5",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+6", "key": "cmd+6",
"command": "workbench.action.openEditorAtIndex6", "command": "workbench.action.openEditorAtIndex6",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+7", "key": "cmd+7",
"command": "workbench.action.openEditorAtIndex7", "command": "workbench.action.openEditorAtIndex7",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+8", "key": "cmd+8",
"command": "workbench.action.openEditorAtIndex8", "command": "workbench.action.openEditorAtIndex8",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+9", "key": "cmd+9",
"command": "workbench.action.openEditorAtIndex9", "command": "workbench.action.openEditorAtIndex9",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+0", "key": "cmd+0",
"command": "workbench.action.lastEditorInGroup" "command": "workbench.action.lastEditorInGroup"
}, },
{ {
"key": "ctrl+t", "key": "cmd+t",
"command": "workbench.action.debug.stop", "command": "workbench.action.debug.stop",
"when": "inDebugMode && !terminalFocus && editorFocus" "when": "inDebugMode && !terminalFocus && editorFocus"
}, },
{ {
"key": "ctrl+r", "key": "cmd+r",
"command": "workbench.action.debug.start", "command": "workbench.action.debug.start",
"when": "!inDebugMode && !terminalFocus && editorFocus" "when": "!inDebugMode && !terminalFocus && editorFocus"
}, },
{ {
"key": "ctrl+shift+s", "key": "cmd+shift+s",
"command": "workbench.action.debug.stepOver", "command": "workbench.action.debug.stepOver",
"when": "inDebugMode && !terminalFocus" "when": "inDebugMode && !terminalFocus"
}, },
{ {
"key": "ctrl+r", "key": "cmd+r",
"command": "workbench.action.debug.continue", "command": "workbench.action.debug.continue",
"when": "inDebugMode" "when": "inDebugMode"
}, },
{ {
"key": "ctrl+shift+b", "key": "cmd+shift+b",
"command": "editor.debug.action.toggleBreakpoint", "command": "editor.debug.action.toggleBreakpoint",
"when": "editorTextFocus" "when": "editorTextFocus"
}, },
{ {
"key": "ctrl+shift+t", "key": "cmd+shift+t",
"command": "workbench.action.debug.restart", "command": "workbench.action.debug.restart",
"when": "inDebugMode" "when": "inDebugMode"
}, },
{ {
"key": "ctrl+shift+c", "key": "cmd+shift+c",
"command": "workbench.action.terminal.toggleFindCaseSensitive", "command": "workbench.action.terminal.toggleFindCaseSensitive",
"when": "terminalFocus || terminalFindWidgetFocused" "when": "terminalFocus || terminalFindFocused"
}, },
{ {
"key": "ctrl+shift+c", "key": "cmd+shift+c",
"command": "toggleFindCaseSensitive", "command": "toggleFindCaseSensitive",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+shift+c", "key": "cmd+shift+c",
"command": "toggleSearchCaseSensitive", "command": "toggleSearchCaseSensitive",
"when": "searchViewletFocus && searchViewletVisible && !fileMatchOrFolderMatchFocus" "when": "searchViewletFocus && searchViewletVisible && !fileMatchOrFolderMatchFocus"
}, },
{ {
"key": "ctrl+shift+d", "key": "cmd+shift+d",
"command": "workbench.action.terminal.toggleFindWholeWord", "command": "workbench.action.terminal.toggleFindWholeWord",
"when": "terminalFocus || terminalFindWidgetFocused" "when": "terminalFocus || terminalFindFocused"
}, },
{ {
"key": "ctrl+shift+d", "key": "cmd+shift+d",
"command": "toggleFindWholeWord", "command": "toggleFindWholeWord",
"when": "editorFocus" "when": "editorFocus"
}, },
{ {
"key": "ctrl+shift+d", "key": "cmd+shift+d",
"command": "toggleSearchWholeWord", "command": "toggleSearchWholeWord",
"when": "searchViewletFocus && searchViewletVisible" "when": "searchViewletFocus && searchViewletVisible"
}, },
{ {
"key": "ctrl+f", "key": "cmd+f",
"command": "workbench.action.terminal.focusFindWidget", "command": "workbench.action.terminal.focusFind",
"when": "terminalFocus" "when": "terminalFocus || terminalFindFocused"
}, },
{ {
"key": "ctrl+f", "key": "cmd+shift+]",
"command": "workbench.action.terminal.focusFindWidget",
"when": "terminalFindWidgetFocused"
},
{
"key": "ctrl+shift+]",
"command": "workbench.action.nextEditor", "command": "workbench.action.nextEditor",
"when": "!terminalFocus" "when": "!terminalFocus"
}, },
{ {
"key": "ctrl+shift+[", "key": "cmd+shift+[",
"command": "workbench.action.previousEditor", "command": "workbench.action.previousEditor",
"when": "!terminalFocus" "when": "!terminalFocus"
}, },
{ {
"key": "ctrl+1", "key": "cmd+1",
"command": "workbench.action.terminal.focusAtIndex1", "command": "workbench.action.terminal.focusAtIndex1",
"when": "terminalFocus" "when": "terminalFocus"
}, },
{ {
"key": "ctrl+2", "key": "cmd+2",
"command": "workbench.action.terminal.focusAtIndex2", "command": "workbench.action.terminal.focusAtIndex2",
"when": "terminalFocus" "when": "terminalFocus"
}, },
{ {
"key": "ctrl+3", "key": "cmd+3",
"command": "workbench.action.terminal.focusAtIndex3", "command": "workbench.action.terminal.focusAtIndex3",
"when": "terminalFocus" "when": "terminalFocus"
}, },
{ {
"key": "ctrl+4", "key": "cmd+4",
"command": "workbench.action.terminal.focusAtIndex4", "command": "workbench.action.terminal.focusAtIndex4",
"when": "terminalFocus" "when": "terminalFocus"
}, },
{ {
"key": "ctrl+5", "key": "cmd+5",
"command": "workbench.action.terminal.focusAtIndex5", "command": "workbench.action.terminal.focusAtIndex5",
"when": "terminalFocus" "when": "terminalFocus"
}, },
{ {
"key": "ctrl+6", "key": "cmd+6",
"command": "workbench.action.terminal.focusAtIndex6", "command": "workbench.action.terminal.focusAtIndex6",
"when": "terminalFocus" "when": "terminalFocus"
}, },
{ {
"key": "ctrl+shift+e", "key": "cmd+shift+e",
"command": "workbench.files.action.focusOpenEditorsView", "command": "workbench.files.action.focusOpenEditorsView",
"when": "workbench.explorer.openEditorsView.active" "when": "workbench.explorer.openEditorsView.active"
}, },
{ {
"key": "ctrl+shift+o", "key": "cmd+shift+o",
"command": "sshHosts.focus" "command": "sshHosts.focus"
}, },
{ {
"key": "ctrl+shift+y", "key": "cmd+shift+y",
"command": "gitlens.views.repositories:gitlens.focus" "command": "gitlens.views.repositories:gitlens.focus"
}, },
{ {
"key": "ctrl+shift+d", "key": "cmd+shift+g",
"command": "-workbench.view.debug"
},
{
"key": "ctrl+shift+g",
"command": "workbench.view.debug" "command": "workbench.view.debug"
}, },
{ {
"key": "ctrl+shift+u", "key": "cmd+shift+u",
"command": "workbench.view.scm" "command": "workbench.view.scm"
}, },
{ {
"key": "ctrl+.", "key": "cmd+.",
"command": "workbench.action.toggleStatusbarVisibility" "command": "workbench.action.toggleStatusbarVisibility"
}, },
{ {
"key": "ctrl+m", "key": "cmd+m",
"command": "macros.bar" "command": "workbench.action.toggleActivityBarVisibility"
}, },
{ {
"key": "ctrl+shift+w", "key": "cmd+shift+w",
"command": "workbench.action.quickSwitchWindow" "command": "workbench.action.quickSwitchWindow"
}, },
{ {
"key": "ctrl+shift+k", "key": "shift+cmd+;",
"command": "-editor.action.deleteLines", "command": "editor.action.formatDocument",
"when": "textInputFocus && !editorReadonly" // "when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
} },
{
"key": "cmd+o",
"command": "workbench.action.openRecent"
},
{
"key": "cmd+t",
"command": "workbench.action.newWindow",
"when": "editorFocus && !inDebugMode && !terminalFocus"
},
] ]