如何在 VSCode 的快速打开面板中预过滤 showCommands
How to pre-filter showCommands in VSCode's quickOpen panel
我有一些扩展程序添加了 4、6 个或更多命令,但我不想为每个命令设置快捷方式。
理想情况下,我可以创建一个快捷方式来显示该扩展的所有命令。
或者显示 workbench.action.showCommands
列表,其中已经设置了一些文本,以便仅显示有趣的命令。
像这样:
{
"key": "ctrl+[Backquote] z",
"command": "workbench.action.showCommands",
"args": { "text": "task marks" },
"when": "editorTextFocus"
}
有什么办法吗?我在 VSCode 的 API documentation 中找不到 workbench.action.showCommands
。
尝试使用它(使用您选择的任何键绑定):
{
"key": "alt+z",
"command" : "workbench.action.quickOpen",
"args" : ">task marks",
"when" : "editorTextFocus"
}
我从 issues: adding an argument to the quickOpen panel 得到语法。
奇怪的是,这行不通:
"command": "workbench.action.showCommands",
"args": "task marks",
只有 workbench.action.quickOpen
命令会接受参数。
我有一些扩展程序添加了 4、6 个或更多命令,但我不想为每个命令设置快捷方式。
理想情况下,我可以创建一个快捷方式来显示该扩展的所有命令。
或者显示 workbench.action.showCommands
列表,其中已经设置了一些文本,以便仅显示有趣的命令。
像这样:
{
"key": "ctrl+[Backquote] z",
"command": "workbench.action.showCommands",
"args": { "text": "task marks" },
"when": "editorTextFocus"
}
有什么办法吗?我在 VSCode 的 API documentation 中找不到 workbench.action.showCommands
。
尝试使用它(使用您选择的任何键绑定):
{
"key": "alt+z",
"command" : "workbench.action.quickOpen",
"args" : ">task marks",
"when" : "editorTextFocus"
}
我从 issues: adding an argument to the quickOpen panel 得到语法。
奇怪的是,这行不通:
"command": "workbench.action.showCommands",
"args": "task marks",
只有 workbench.action.quickOpen
命令会接受参数。