简体   繁体   English

VSCode 中所有可用命令的列表

[英]List of all available commands in VSCode

Where can I find the list of all commands available in VSCode and their description ?我在哪里可以找到 VSCode 中所有可用命令的列表及其描述

I'm only aware of these sources:我只知道这些来源:

In the official docs:在官方文档中:

  • 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? )这个列表似乎只包含 Visual Studio Code 命令的一个子集,您可能会在vscode.commands.executeCommand API中使用这些命令(为什么这只是完整列表的一个子集?
  • 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? )键绑定文档中的另一个列表,它似乎也只包括所有可用命令的子集我想那些与默认键绑定相关的命令?

In the editor itself:在编辑器本身中:

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 (eg maximizeOtherEditor isn't listed)许多操作都用//注释掉了,但有趣的是,我认为这也不包括所有命令(例如,未列出maximizeOtherEditor


Does VSCode have an official list of commands ( commandID 's) either in its documentation or in its code base? VSCode 在其文档或代码库中是否有正式的命令列表( commandID )? If not:如果不:

  • What's the closest to it?最接近它的是什么?
  • What's a good way to navigate the code base to try to find all commands and what they do?导航代码库以尝试查找所有命令及其作用的好方法是什么?

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.相信“首选项:默认键盘快捷键 (JSON)”(命令 ID workbench.action.openDefaultKeybindingsFile )的内容确实显示了 VSC 在调用时知道的所有本机和扩展贡献命令的完整列表。

This file shows key s from VSC's defaults and extension manifests.此文件显示 VSC 的默认值和扩展清单中的key Commands with no suggested defaults are those commented out at the end of file.没有建议默认值的命令是那些在文件末尾被注释掉的命令。

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.它们的描述(如在命令面板、键盘快捷键设置、扩展贡献选项卡和其他地方看到的)应该在本地化属性中,我相信目前无法在单个方便的“本地化”列表中查看它们各自的命令 ID 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.因此,目前阅读上述 JSON 中找到的命令描述的唯一方法是将其 ID 粘贴到键盘快捷键搜索字段中。 (Would be delighted to be proven wrong.) (很高兴被证明是错误的。)

In case someone ever fell on this and just wanted a quick-list of VSCode commands to browse through: https://gist.github.com/skfarhat/4e88ef386c93b9dceb98121d9457edbf万一有人遇到这种情况,只想快速浏览 VSCode 命令列表: https://gist.github.com/skfarhat/4e88ef386c93b9dceb98121d9457edbf

If you do, please note the VSCode version and commit.如果你这样做,请注意 VSCode 版本并提交。 These may well be out of date by the time you read them.当您阅读它们时,它们可能已经过时了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM