From 72dfd03fb2e177f1f8e3f63fb9cc375cfde8b996 Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 21 Jan 2022 23:31:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'keybindings.json'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keybindings.json | 75 +++++++++++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 26 deletions(-) diff --git a/keybindings.json b/keybindings.json index edea888..e614801 100644 --- a/keybindings.json +++ b/keybindings.json @@ -26,11 +26,11 @@ "command": "workbench.action.closeWindow", "when": "!multipleEditorGroups && !inDebugMode" }, - { - "key": "cmd+w", - "command": "workbench.action.closeWindow", - "when": "!editorIsOpen && !multipleEditorGroups" - }, + // { + // "key": "cmd+w", + // "command": "workbench.action.closeWindow", + // "when": "!editorIsOpen && !terminalFocus && !multipleEditorGroups" + // }, { "key": "cmd+c", "command": "editor.action.clipboardCopyAction", @@ -41,16 +41,6 @@ "command": "editor.action.clipboardCutAction", "when": "textInputFocus && !editorReadonly" }, - { - "key": "cmd+f", - "command": "actions.find", - "when": "!findInputFocussed" - }, - { - "key": "cmd+f", - "command": "editor.action.nextMatchFindAction", - "when": "findInputFocussed" - }, { "key": "cmd+n", "command": "editor.action.nextMatchFindAction", @@ -180,14 +170,24 @@ }, { "key": "cmd+t", - "command": "workbench.action.terminal.newInActiveWorkspace", - "when": "terminalFocus || terminalFindFocused" + "command": "workbench.action.terminal.new", + "when": "activePanel" + }, + { + "key": "cmd+t", + "command": "workbench.action.createTerminalEditor", + "when": "!activePanel" }, { "key": "cmd+w", "command": "workbench.action.terminal.kill", "when": "terminalFocus || terminalFindFocused" }, + { + "key": "cmd+w", + "command": "workbench.action.terminal.killEditor", + "when": "terminalEditorFocus || terminalFindFocused" + }, { "key": "cmd+shift+]", "command": "workbench.action.terminal.focusNext", @@ -319,22 +319,37 @@ { "key": "cmd+f", "command": "workbench.action.terminal.focusFind", - "when": "terminalFocus && !terminalFindFocused" + "when": "!terminalFindFocused && terminalEditorFocus" + }, + { + "key": "cmd+f", + "command": "workbench.action.terminal.focusFind", + "when": "!terminalFindFocused && terminalFocus" }, { "key": "cmd+f", "command": "workbench.action.terminal.findNext", "when": "terminalFindFocused" }, + { + "key": "cmd+f", + "command": "actions.find", + "when": "!findInputFocussed && !terminalFocus && !terminalFindFocused && !terminalEditorFocus" + }, + { + "key": "cmd+f", + "command": "editor.action.nextMatchFindAction", + "when": "findInputFocussed && !terminalFocus && !terminalFindFocused && !terminalEditorFocus" + }, { "key": "cmd+shift+]", "command": "workbench.action.nextEditor", - "when": "!terminalFocus" + "when": "!terminalFocus || terminalEditorFocus" }, { "key": "cmd+shift+[", "command": "workbench.action.previousEditor", - "when": "!terminalFocus" + "when": "!terminalFocus || terminalEditorFocus" }, { "key": "cmd+1", @@ -408,17 +423,11 @@ { "key": "shift+cmd+;", "command": "editor.action.formatDocument", - // "when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor" }, { "key": "cmd+o", "command": "workbench.action.openRecent" }, - { - "key": "cmd+t", - "command": "workbench.action.newWindow", - "when": "!inDebugMode && !terminalFocus && !terminalFindFocused" - }, { "key": "shift+cmd+v", "command": "open-in-vim.open" @@ -427,4 +436,18 @@ "key": "ctrl+cmd+w", "command": "-workbench.action.toggleTabsVisibility" }, + { + "key": "ctrl+shift+`", + "command": "-workbench.action.terminal.new", + "when": "terminalProcessSupported || terminalWebExtensionContributedProfile" + }, + { + "key": "cmd+t", + "command": "-workbench.action.showAllSymbols" + }, + { + "key": "escape", + "command": "closeFindWidget", + "when": "findWidgetVisible" + }, ] \ No newline at end of file