From f807eba48dfb2efa56978c7eea2a40bc895cd644 Mon Sep 17 00:00:00 2001 From: James Yu Date: Fri, 22 Sep 2023 11:56:25 +0100 Subject: [PATCH] Fix #4023 Enable keybinds on doctex --- package.json | 92 ++++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/package.json b/package.json index 5f151463a..8d88aa716 100644 --- a/package.json +++ b/package.json @@ -504,31 +504,31 @@ "key": "ctrl+l alt+m", "mac": "cmd+l alt+m", "command": "latex-workshop.toggleMathPreviewPanel", - "when": "editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && config.latex-workshop.bind.altKeymap.enabled" + "when": "editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && config.latex-workshop.bind.altKeymap.enabled" }, { "key": "ctrl+l alt+b", "mac": "cmd+l alt+b", "command": "latex-workshop.build", - "when": "editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" + "when": "editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" }, { "key": "ctrl+l alt+c", "mac": "cmd+l alt+c", "command": "latex-workshop.clean", - "when": "editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" + "when": "editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" }, { "key": "ctrl+l alt+v", "mac": "cmd+l alt+v", "command": "latex-workshop.view", - "when": "editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" + "when": "editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" }, { "key": "ctrl+l alt+j", "mac": "cmd+l alt+j", "command": "latex-workshop.synctex", - "when": "editorTextFocus && editorLangId == 'latex' && config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" + "when": "editorTextFocus && editorLangId =~ /^latex$|^latex-expl3$|^doctex$/ && config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" }, { "key": "ctrl+l alt+x", @@ -540,31 +540,31 @@ "key": "ctrl+alt+m", "mac": "cmd+alt+m", "command": "latex-workshop.toggleMathPreviewPanel", - "when": "editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && !config.latex-workshop.bind.altKeymap.enabled" + "when": "editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && !config.latex-workshop.bind.altKeymap.enabled" }, { "key": "ctrl+alt+b", "mac": "cmd+alt+b", "command": "latex-workshop.build", - "when": "editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && !config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" + "when": "editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && !config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" }, { "key": "ctrl+alt+c", "mac": "cmd+alt+c", "command": "latex-workshop.clean", - "when": "editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && !config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" + "when": "editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && !config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" }, { "key": "ctrl+alt+v", "mac": "cmd+alt+v", "command": "latex-workshop.view", - "when": "editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && !config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" + "when": "editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && !config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" }, { "key": "ctrl+alt+j", "mac": "cmd+alt+j", "command": "latex-workshop.synctex", - "when": "editorTextFocus && editorLangId == 'latex' && !config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" + "when": "editorTextFocus && editorLangId =~ /^latex$|^latex-expl3$|^doctex$/ && !config.latex-workshop.bind.altKeymap.enabled && !virtualWorkspace" }, { "key": "ctrl+alt+x", @@ -575,188 +575,188 @@ { "key": "ctrl+l [", "mac": "cmd+l [", - "when": "config.latex-workshop.bind.altKeymap.enabled && editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "config.latex-workshop.bind.altKeymap.enabled && editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.promote-sectioning" }, { "key": "ctrl+l ]", "mac": "cmd+l ]", - "when": "config.latex-workshop.bind.altKeymap.enabled && editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "config.latex-workshop.bind.altKeymap.enabled && editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.demote-sectioning" }, { "key": "ctrl+alt+[", "mac": "cmd+alt+[", - "when": "!config.latex-workshop.bind.altKeymap.enabled && editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "!config.latex-workshop.bind.altKeymap.enabled && editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.promote-sectioning" }, { "key": "ctrl+alt+]", "mac": "cmd+alt+]", - "when": "!config.latex-workshop.bind.altKeymap.enabled && editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "!config.latex-workshop.bind.altKeymap.enabled && editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.demote-sectioning" }, { "key": "ctrl+l ctrl+enter", "mac": "cmd+l cmd+enter", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.item" }, { "key": "ctrl+l ctrl+b", "mac": "cmd+l cmd+b", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.textbf" }, { "key": "ctrl+l ctrl+i", "mac": "cmd+l cmd+i", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.textit" }, { "key": "ctrl+l ctrl+u", "mac": "cmd+l cmd+u", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.underline" }, { "key": "ctrl+l ctrl+e", "mac": "cmd+l cmd+e", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.emph" }, { "key": "ctrl+l ctrl+r", "mac": "cmd+l cmd+r", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.textrm" }, { "key": "ctrl+l ctrl+t", "mac": "cmd+l cmd+t", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.texttt" }, { "key": "ctrl+l ctrl+s", "mac": "cmd+l cmd+s", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.textsl" }, { "key": "ctrl+l ctrl+c", "mac": "cmd+l cmd+c", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.textsc" }, { "key": "ctrl+l ctrl+n", "mac": "cmd+l cmd+n", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.textnormal" }, { "key": "ctrl+l ctrl+6", "mac": "cmd+l cmd+6", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.textsuperscript" }, { "key": "ctrl+l ctrl+oem_minus", "mac": "cmd+l cmd+oem_minus", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.textsubscript" }, { "key": "ctrl+m ctrl+b", "mac": "ctrl+shift+m cmd+b", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.mathbf" }, { "key": "ctrl+m ctrl+i", "mac": "ctrl+shift+m cmd+i", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.mathit" }, { "key": "ctrl+m ctrl+r", "mac": "ctrl+shift+m cmd+r", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.mathrm" }, { "key": "ctrl+m ctrl+t", "mac": "ctrl+shift+m cmd+t", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.mathtt" }, { "key": "ctrl+m ctrl+s", "mac": "ctrl+shift+m cmd+s", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.mathsf" }, { "key": "ctrl+m ctrl+shift+b", "mac": "ctrl+shift+m cmd+shift+b", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.mathbb" }, { "key": "ctrl+m ctrl+c", "mac": "ctrl+shift+m cmd+c", - "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.shortcut.mathcal" }, { "command": "expandLineSelection", "key": "ctrl+l ctrl+l", "mac": "cmd+l cmd+l", - "when": "textInputFocus && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/" + "when": "textInputFocus && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/" }, { "command": "editor.action.toggleTabFocusMode", "key": "ctrl+l ctrl+m", "mac": "cmd+l ctrl+shift+m", - "when": "textInputFocus && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/" + "when": "textInputFocus && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/" }, { "key": "ctrl+l ctrl+w", "mac": "cmd+l cmd+w", - "when": "editorTextFocus && !editorReadonly && editorHasSelection && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/", + "when": "editorTextFocus && !editorReadonly && editorHasSelection && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/", "command": "latex-workshop.surround" }, { "command": "latex-workshop.onEnterKey", "key": "enter", - "when": "config.latex-workshop.bind.enter.key && editorTextFocus && acceptSuggestionOnEnter && !suggestWidgetVisible && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && vim.active && vim.mode == 'Insert'" + "when": "config.latex-workshop.bind.enter.key && editorTextFocus && acceptSuggestionOnEnter && !suggestWidgetVisible && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && vim.active && vim.mode == 'Insert'" }, { "command": "latex-workshop.onEnterKey", "key": "enter", - "when": "config.latex-workshop.bind.enter.key && editorTextFocus && !acceptSuggestionOnEnter && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && vim.active && vim.mode == 'Insert'" + "when": "config.latex-workshop.bind.enter.key && editorTextFocus && !acceptSuggestionOnEnter && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && vim.active && vim.mode == 'Insert'" }, { "command": "latex-workshop.onEnterKey", "key": "enter", - "when": "config.latex-workshop.bind.enter.key && editorTextFocus && acceptSuggestionOnEnter && !suggestWidgetVisible && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && !vim.active" + "when": "config.latex-workshop.bind.enter.key && editorTextFocus && acceptSuggestionOnEnter && !suggestWidgetVisible && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && !vim.active" }, { "command": "latex-workshop.onEnterKey", "key": "enter", - "when": "config.latex-workshop.bind.enter.key && editorTextFocus && !acceptSuggestionOnEnter && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && !vim.active" + "when": "config.latex-workshop.bind.enter.key && editorTextFocus && !acceptSuggestionOnEnter && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && !vim.active" }, { "command": "latex-workshop.onAltEnterKey", "key": "alt+enter", - "when": "config.latex-workshop.bind.enter.key && editorTextFocus && acceptSuggestionOnEnter && !suggestWidgetVisible && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/" + "when": "config.latex-workshop.bind.enter.key && editorTextFocus && acceptSuggestionOnEnter && !suggestWidgetVisible && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/" }, { "command": "latex-workshop.onAltEnterKey", "key": "alt+enter", - "when": "config.latex-workshop.bind.enter.key && editorTextFocus && !acceptSuggestionOnEnter && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/" + "when": "config.latex-workshop.bind.enter.key && editorTextFocus && !acceptSuggestionOnEnter && !editorReadonly && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/" } ], "configurationDefaults": { @@ -2477,24 +2477,24 @@ "menus": { "editor/context": [ { - "when": "config.latex-workshop.showContextMenu && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && !virtualWorkspace", + "when": "config.latex-workshop.showContextMenu && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && !virtualWorkspace", "command": "latex-workshop.build", "group": "navigation@100" }, { - "when": "config.latex-workshop.showContextMenu && editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && !virtualWorkspace", + "when": "config.latex-workshop.showContextMenu && editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && !virtualWorkspace", "command": "latex-workshop.synctex", "group": "navigation@101" } ], "editor/title": [ { - "when": "editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && !virtualWorkspace", + "when": "editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && !virtualWorkspace", "command": "latex-workshop.view", "group": "navigation@2" }, { - "when": "editorLangId =~ /^latex$|^latex-expl3$|^rsweave$|^jlweave$|^pweave$/ && !virtualWorkspace", + "when": "editorLangId =~ /^latex$|^latex-expl3$|^doctex$|^rsweave$|^jlweave$|^pweave$/ && !virtualWorkspace", "command": "latex-workshop.build", "group": "navigation@1" }