From a8542c6c88984a3229573dd0cdc369e35a63798f Mon Sep 17 00:00:00 2001 From: John Date: Sat, 7 May 2022 22:00:34 -0500 Subject: [PATCH 1/3] package.json: - Remove duplicate entries - Unify names of submenus according to Mind Reader naming conventions - Add keybinds for things I accidentally only had in my User configuration (oops!) --- package.json | 127 ++++++++++++++++++++++++++------------------------- 1 file changed, 66 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index cab1524..945d3ec 100644 --- a/package.json +++ b/package.json @@ -117,67 +117,27 @@ }, { "command": "mind-reader.getLineNumber", - "title": "Get The Current Line Number" - }, - { - "command": "mind-reader.getIndent", - "title": "Get The Number Of Line Indentations" - }, - { - "command": "mind-reader.getLeadingSpaces", - "title": "Get The Number Of Leading Spaces" - }, - { - "command": "mind-reader.selectLeadingWhitespace", - "title": "Select The Leading Whitespace" - }, - { - "command": "mind-reader.getNumberOfSelectedLines", - "title": "Get The Number Of Selected Lines" - }, - { - "command": "mind-reader.connectHub", - "title": "Connect LEGO SPIKE Prime Hub", - "category": "SPIKE Prime" - }, - { - "command": "mind-reader.disconnectHub", - "title": "Disconnect LEGO SPIKE Prime Hub", - "category": "SPIKE Prime" - }, - { - "command": "mind-reader.uploadCurrentFile", - "title": "Upload Current File to LEGO SPIKE Prime Hub", - "category": "SPIKE Prime" - }, - { - "command": "mind-reader.runProgram", - "title": "Run a Program on the LEGO SPIKE Prime Hub", - "category": "SPIKE Prime" - }, - { - "command": "mind-reader.stopExecution", - "title": "Stop Running Program on the LEGO SPIKE Prime Hub", - "category": "SPIKE Prime" - }, - { - "command": "mind-reader.deleteProgram", - "title": "Delete a Program from the LEGO SPIKE Prime Hub", - "category": "SPIKE Prime" - }, - { - "command": "mind-reader.uploadCurrentFile", - "title": "Upload Current File to the LEGO SPIKE Prime Hub", - "category": "SPIKE Prime" - }, - { - "command": "mind-reader.getLeadingSpaces", - "title": "Get Leading Spaces", + "title": "Get The Current Line Number", "category": "Mind Reader" }, { - "command": "mind-reader.getLineNumber", - "title": "Get Line Number", + "command": "mind-reader.getIndent", + "title": "Get The Number Of Line Indentations", + "category": "Mind Reader" + }, + { + "command": "mind-reader.getLeadingSpaces", + "title": "Get The Number Of Leading Spaces", + "category": "Mind Reader" + }, + { + "command": "mind-reader.selectLeadingWhitespace", + "title": "Select The Leading Whitespace", + "category": "Mind Reader" + }, + { + "command": "mind-reader.getNumberOfSelectedLines", + "title": "Get The Number Of Selected Lines", "category": "Mind Reader" }, { @@ -238,9 +198,44 @@ "command": "mind-reader.showCommands", "title": "Show All Commands", "category": "Mind Reader" + }, + { + "command": "mind-reader.connectHub", + "title": "Connect a LEGO SPIKE Prime Hub", + "category": "SPIKE Prime" + }, + { + "command": "mind-reader.disconnectHub", + "title": "Disconnect a LEGO SPIKE Prime Hub", + "category": "SPIKE Prime" + }, + { + "command": "mind-reader.runProgram", + "title": "Run a Program on the LEGO SPIKE Prime Hub", + "category": "SPIKE Prime" + }, + { + "command": "mind-reader.stopExecution", + "title": "Stop Running Program on the LEGO SPIKE Prime Hub", + "category": "SPIKE Prime" + }, + { + "command": "mind-reader.deleteProgram", + "title": "Delete a Program from the LEGO SPIKE Prime Hub", + "category": "SPIKE Prime" + }, + { + "command": "mind-reader.uploadCurrentFile", + "title": "Upload Current File to the LEGO SPIKE Prime Hub", + "category": "SPIKE Prime" } ], "keybindings": [ + { + "command": "accessActions.focus", + "key": "Ctrl+Shift+/ Ctrl+Shift+/", + "mac": "Cmc+Shift+[Slash] Cmc+Shift+[Slash]" + }, { "command": "editor.action.fontZoomOut", "key": "Shift+Alt+z -", @@ -285,6 +280,16 @@ "command": "mind-reader.openKeybinds", "key": "Ctrl+Shift+/ K", "mac": "Cmd+Shift+[Slash] K" + }, + { + "command": "mind-reader.getNumberOfSelectedLines", + "key": "Ctrl+Shift+/ N", + "mac": "Cmd+Shift+[Slash] N" + }, + { + "command": "mind-reader.selectLeadingWhitespace", + "key": "Ctrl+Shift+/ W", + "mac": "Ctrl+Shift+[Slash] W" } ], "menus": { @@ -563,7 +568,7 @@ } ], "views": { - "MindReader": [ + "Mind-Reader": [ { "id": "accessActions", "name": "Access Actions", @@ -581,8 +586,8 @@ "viewsContainers": { "activitybar": [ { - "id": "MindReader", - "title": "MindReader Actions", + "id": "Mind-Reader", + "title": "Mind Reader Actions", "icon": "media/dep.svg" } ] From 95dfce9d77c1c864ea3b1735ea01c676de1f0a15 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 7 May 2022 22:33:26 -0500 Subject: [PATCH 2/3] Reorganize right-click context menu To reorganize the context menu, - ${group: number}_name-of-group@${position_in_group: number} --- package.json | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 945d3ec..ba8ed35 100644 --- a/package.json +++ b/package.json @@ -300,74 +300,75 @@ } ], "mind-reader.editor.context": [ + + { + "command": "mind-reader.openKeybinds", + "group": "0_mind-reader@0", + "when": "activeEditor" + }, { "command": "mind-reader.selectTheme", - "group": "mind-reader", + "group": "0_mind-reader@1", "when": "activeEditor" }, { "command": "mind-reader.increaseFontScale", - "group": "mind-reader", + "group": "1_mind-reader@0", "when": "activeEditor" }, { "command": "mind-reader.decreaseFontScale", - "group": "mind-reader", + "group": "1_mind-reader@1", "when": "activeEditor" }, { "command": "mind-reader.resetFontScale", - "group": "mind-reader", + "group": "1_mind-reader@2", "when": "activeEditor" }, { "command": "mind-reader.increaseEditorScale", - "group": "mind-reader", + "group": "2_mind-reader@0", "when": "activeEditor" }, { "command": "mind-reader.decreaseEditorScale", - "group": "mind-reader", + "group": "2_mind-reader@1", "when": "activeEditor" }, { "command": "mind-reader.resetEditorScale", - "group": "mind-reader", + "group": "2_mind-reader@2", "when": "activeEditor" }, { "command": "mind-reader.getLineNumber", - "group": "mind-reader", + "group": "3_mind-reader@0", "when": "activeEditor" }, { "command": "mind-reader.getIndent", - "group": "mind-reader", + "group": "3_mind-reader@1", "when": "activeEditor" }, { "command": "mind-reader.getLeadingSpaces", - "group": "mind-reader", - "when": "activeEditor" - }, - { - "command": "mind-reader.selectLeadingWhitespace", - "group": "mind-reader", + "group": "3_mind-reader@2", "when": "activeEditor" }, { "command": "mind-reader.getNumberOfSelectedLines", - "group": "mind-reader", + "group": "3_mind-reader@3", + "when": "activeEditor" + }, + { + "command": "mind-reader.selectLeadingWhitespace", + "group": "4_mind-reader@0", "when": "activeEditor" }, { "command": "mind-reader.openWebview", - "group": "mind-reader", - "when": "activeEditor" - }, - { - "command": "mind-reader.openKeybinds", - "group": "mind-reader", + "group": "z_mind-reader@99", "when": "activeEditor" } ] From b7679b1de239a0b09ac05f3ff2801a48a53960a1 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 7 May 2022 23:20:07 -0500 Subject: [PATCH 3/3] Add keybinds for all important menu items Some functions are not exposed by vscode on startup, so we must wrap them. --- package.json | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index ba8ed35..9ad1fd7 100644 --- a/package.json +++ b/package.json @@ -233,23 +233,27 @@ "keybindings": [ { "command": "accessActions.focus", + "comment": "This opens the Access Actions menu", "key": "Ctrl+Shift+/ Ctrl+Shift+/", "mac": "Cmc+Shift+[Slash] Cmc+Shift+[Slash]" }, { - "command": "editor.action.fontZoomOut", - "key": "Shift+Alt+z -", - "when": "editorTextFocus && config.mind-reader.reader.screenReader != JAWS" + "command": "mind-reader.decreaseFontScale", + "key": "Shift+Alt+Z -", + "mac": "Cmd+Shift+Z -", + "when": "editorTextFocus" }, { - "command": "editor.action.fontZoomIn", - "key": "Shift+Alt+z =", - "when": "editorTextFocus && config.mind-reader.reader.screenReader != JAWS" + "command": "mind-reader.increaseFontScale", + "key": "Shift+Alt+Z =", + "mac": "Cmd+Shift+Z =", + "when": "editorTextFocus" }, { - "command": "editor.action.fontZoomReset", - "key": "Shift+Alt+z 0", - "when": "editorTextFocus && config.mind-reader.reader.screenReader != JAWS" + "command": "mind-reader.resetFontScale", + "key": "Shift+Alt+Z 0", + "mac": "Cmd+Shift+Z 0", + "when": "editorTextFocus" }, { "command": "mind-reader.getIndent", @@ -261,8 +265,7 @@ "command": "mind-reader.getLeadingSpaces", "key": "Ctrl+Shift+/ S", "mac": "Cmd+Shift+[Slash] S", - "when": "editorTextFocus", - "comment": "Requires python language" + "when": "editorTextFocus && editorLangId == python" }, { "command": "mind-reader.getLineNumber", @@ -289,7 +292,7 @@ { "command": "mind-reader.selectLeadingWhitespace", "key": "Ctrl+Shift+/ W", - "mac": "Ctrl+Shift+[Slash] W" + "mac": "Cmd+Shift+[Slash] W" } ], "menus": { @@ -300,14 +303,13 @@ } ], "mind-reader.editor.context": [ - { "command": "mind-reader.openKeybinds", "group": "0_mind-reader@0", "when": "activeEditor" }, { - "command": "mind-reader.selectTheme", + "command": "workbench.action.selectTheme", "group": "0_mind-reader@1", "when": "activeEditor" }, @@ -327,17 +329,17 @@ "when": "activeEditor" }, { - "command": "mind-reader.increaseEditorScale", + "command": "workbench.action.zoomIn", "group": "2_mind-reader@0", "when": "activeEditor" }, { - "command": "mind-reader.decreaseEditorScale", + "command": "workbench.action.zoomOut", "group": "2_mind-reader@1", "when": "activeEditor" }, { - "command": "mind-reader.resetEditorScale", + "command": "workbench.action.zoomReset", "group": "2_mind-reader@2", "when": "activeEditor" },