VSCode 中所有可用命令的列表 [英] List of all available commands in VSCode

查看:35
本文介绍了VSCode 中所有可用命令的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在哪里可以找到 VSCode 中可用的所有命令的列表及其描述?

Where can I find the list of all commands available in VSCode and their description?

我只知道这些来源:

  • 这个列表似乎只包含一个子集您可能会与 vscode.commands.executeCommand API 一起使用的 Visual Studio Code 命令(为什么这只是完整列表的一个子集?)
  • 键绑定文档中的另一个列表,其中似乎也只包含一个 <所有可用命令的强>子集(我想那些与默认键绑定相关的命令?)
  • This list which only seems to include a subset of Visual Studio Code commands that you might use with vscode.commands.executeCommand API (why is this only a subset of the full list?)
  • This other list in the keybindings doc, which also only seems to include a subset of all commands available (I suppose those tied to a default keybinding?)

当我打开默认键绑定"时,我可以看到命令列表.许多操作都用 // 注释掉了,但有趣的是,我认为这也不包括所有命令(例如 maximizeOtherEditor 未列出)

I can see a list of commands when I open the "default keybindings". Many actions are commented out with //, but interestingly I don't think this includes all the commands either (e.g. maximizeOtherEditor isn't listed)

VSCode 在其文档或代码库中是否有正式的命令列表(commandID's)?如果不是:

Does VSCode have an official list of commands (commandID's) either in its documentation or in its code base? If not:

  • 最接近它的是什么?
  • 导航代码库以尝试查找所有命令及其作用的好方法是什么?

推荐答案

相信Preferences: Default Keyboard Shortcuts (JSON)"的内容(命令 ID workbench.action.openDefaultKeybindingsFile) 确实显示了 VSC 在调用时知道的所有本机和扩展提供的命令的完整列表.

I believe that content of "Preferences: Default Keyboard Shortcuts (JSON)" (command ID workbench.action.openDefaultKeybindingsFile) really shows comprehensive list of all native and extensions-contributed commands VSC knows about at moment when invoked.

此文件显示来自 VSC 的默认值和扩展程序清单的 keys.没有建议默认值的命令是在文件末尾注释掉的命令.

This file shows keys from VSC's defaults and extension manifests. Commands with no suggested defaults are those commented out at the end of file.

他们的描述(如在命令面板、键盘快捷键设置、扩展贡献选项卡和其他地方看到的)应该在本地化属性中,我相信目前无法看到它们它们各自的命令 ID 在一个方便的本地化"列表中.因此,目前读取上述 JSON 中的命令描述的唯一方法是将其 ID 粘贴到键盘快捷键搜索字段中.(会很高兴被证明是错误的.)

Their descriptions (as seen in the Command Palette, Keyboard Shortcuts settings, extension Contributions tab and elsewhere) are supposedly in localization properties and I believe there is currently no way to see them along their respective command IDs in single convenient "localized" list. So for now the only way to read the description of command found in aforementioned JSON is pasting its ID into Keyboard Shortcuts search field. (Would be delighted to be proven wrong.)

这篇关于VSCode 中所有可用命令的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆