From 0944f32ae14c66b53136566b4e956ec6fd7ebb8c Mon Sep 17 00:00:00 2001 From: kasecato Date: Sun, 14 Mar 2021 15:28:45 +0900 Subject: [PATCH] Fixed #212 that Ctrl + Enter started to conflict with git commit after v1.4.0 --- package.json | 6 ++++++ resource/default/Linux/VSCode.json | 12 ++++++++---- resource/default/Mac/VSCode.json | 12 ++++++++---- resource/default/Windows/VSCode.json | 12 ++++++++---- src/package-with-comment.json | 6 ++++++ 5 files changed, 36 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 45219b3..a6f637a 100644 --- a/package.json +++ b/package.json @@ -534,6 +534,7 @@ "key": "ctrl+alt+shift+n", "mac": "cmd+alt+o", "command": "workbench.action.gotoSymbol", + "when": "editorTextFocus", "intellij": "Go to symbol" }, { @@ -649,6 +650,7 @@ "key": "ctrl+b", "mac": "cmd+b", "command": "editor.action.goToDeclaration", + "when": "editorTextFocus", "intellij": "Go to declaration" }, { @@ -674,6 +676,7 @@ "key": "ctrl+shift+b", "mac": "ctrl+shift+b", "command": "editor.action.goToTypeDefinition", + "when": "editorTextFocus", "intellij": "Go to type declaration", "todo": "not working" }, @@ -687,6 +690,7 @@ "key": "ctrl+f12", "mac": "cmd+f12", "command": "workbench.action.gotoSymbol", + "when": "editorTextFocus", "intellij": "File structure popup" }, { @@ -712,12 +716,14 @@ "key": "f4", "mac": "f4", "command": "editor.action.goToDeclaration", + "when": "editorTextFocus", "intellij": "Edit source" }, { "key": "ctrl+enter", "mac": "cmd+down", "command": "editor.action.goToDeclaration", + "when": "editorTextFocus", "intellij": "View source" }, { diff --git a/resource/default/Linux/VSCode.json b/resource/default/Linux/VSCode.json index ef42514..f51f299 100644 --- a/resource/default/Linux/VSCode.json +++ b/resource/default/Linux/VSCode.json @@ -294,7 +294,8 @@ }, { "key": "ctrl+shift+o", - "command": "workbench.action.gotoSymbol" + "command": "workbench.action.gotoSymbol", + "when": "editorTextFocus" }, { "key": "ctrl+pageup", @@ -343,7 +344,8 @@ }, { "key": "", - "command": "editor.action.goToDeclaration" + "command": "editor.action.goToDeclaration", + "when": "editorTextFocus" }, { "key": "ctrl+f12", @@ -356,7 +358,8 @@ }, { "key": "", - "command": "editor.action.goToTypeDefinition" + "command": "editor.action.goToTypeDefinition", + "when": "editorTextFocus" }, { "key": "", @@ -364,7 +367,8 @@ }, { "key": "ctrl+shift+o", - "command": "workbench.action.gotoSymbol" + "command": "workbench.action.gotoSymbol", + "when": "editorTextFocus" }, { "key": "alt+f8", diff --git a/resource/default/Mac/VSCode.json b/resource/default/Mac/VSCode.json index 7913ec8..57744ff 100644 --- a/resource/default/Mac/VSCode.json +++ b/resource/default/Mac/VSCode.json @@ -306,7 +306,8 @@ }, { "key": "shift+cmd+o", - "command": "workbench.action.gotoSymbol" + "command": "workbench.action.gotoSymbol", + "when": "editorTextFocus" }, { "key": "shift+cmd+[", @@ -363,7 +364,8 @@ }, { "key": "", - "command": "editor.action.goToDeclaration" + "command": "editor.action.goToDeclaration", + "when": "editorTextFocus" }, { "key": "cmd+f12", @@ -376,7 +378,8 @@ }, { "key": "", - "command": "editor.action.goToTypeDefinition" + "command": "editor.action.goToTypeDefinition", + "when": "editorTextFocus" }, { "key": "", @@ -384,7 +387,8 @@ }, { "key": "shift+cmd+o", - "command": "workbench.action.gotoSymbol" + "command": "workbench.action.gotoSymbol", + "when": "editorTextFocus" }, { "key": "alt+f8", diff --git a/resource/default/Windows/VSCode.json b/resource/default/Windows/VSCode.json index 13d2540..2c968e8 100644 --- a/resource/default/Windows/VSCode.json +++ b/resource/default/Windows/VSCode.json @@ -302,7 +302,8 @@ }, { "key": "ctrl+shift+o", - "command": "workbench.action.gotoSymbol" + "command": "workbench.action.gotoSymbol", + "when": "editorTextFocus" }, { "key": "ctrl+pageup", @@ -351,7 +352,8 @@ }, { "key": "", - "command": "editor.action.goToDeclaration" + "command": "editor.action.goToDeclaration", + "when": "editorTextFocus" }, { "key": "ctrl+f12", @@ -364,7 +366,8 @@ }, { "key": "", - "command": "editor.action.goToTypeDefinition" + "command": "editor.action.goToTypeDefinition", + "when": "editorTextFocus" }, { "key": "", @@ -372,7 +375,8 @@ }, { "key": "ctrl+shift+o", - "command": "workbench.action.gotoSymbol" + "command": "workbench.action.gotoSymbol", + "when": "editorTextFocus" }, { "key": "alt+f8", diff --git a/src/package-with-comment.json b/src/package-with-comment.json index d9d2c5c..76135a0 100644 --- a/src/package-with-comment.json +++ b/src/package-with-comment.json @@ -830,6 +830,7 @@ "key": "ctrl+alt+shift+n", "mac": "cmd+alt+o", "command": "workbench.action.gotoSymbol", + "when": "editorTextFocus", "intellij": "Go to symbol" }, { @@ -1001,6 +1002,7 @@ "key": "ctrl+b", "mac": "cmd+b", "command": "editor.action.goToDeclaration", + "when": "editorTextFocus", "intellij": "Go to declaration" }, { @@ -1026,6 +1028,7 @@ "key": "ctrl+shift+b", "mac": "ctrl+shift+b", "command": "editor.action.goToTypeDefinition", + "when": "editorTextFocus", "intellij": "Go to type declaration", "todo": "not working" }, @@ -1089,6 +1092,7 @@ "key": "ctrl+f12", "mac": "cmd+f12", "command": "workbench.action.gotoSymbol", + "when": "editorTextFocus", "intellij": "File structure popup" }, /* @@ -1144,12 +1148,14 @@ "key": "f4", "mac": "f4", "command": "editor.action.goToDeclaration", + "when": "editorTextFocus", "intellij": "Edit source" }, { "key": "ctrl+enter", "mac": "cmd+down", "command": "editor.action.goToDeclaration", + "when": "editorTextFocus", "intellij": "View source" }, {