【问题标题】:How to find the parameters for a VSCode command in executeCommands()如何在 executeCommands() 中查找 VSCode 命令的参数
【发布时间】:2019-12-12 08:42:56
【问题描述】:

我想写一个vscode扩展并使用vscode.commands.executeCommands(),但是我不知道我要使用的命令需要什么参数。

例如,当我想使用"actions.find"命令时,我如何知道这个特定的API接受哪些参数?

【问题讨论】:

    标签: visual-studio-code vscode-extensions


    【解决方案1】:

    我认为目前没有任何关于命令及其参数的全面文档。 This page 确实列出了一些最重要的。

    对于某些命令,keybindings.json 中还有 args 自动补全:

    请注意,许多内置命令根本不是“API”。 Looking at its implementation"actions.find" 似乎不支持任何对扩展有用的参数。将此与 implementation of "workbench.action.findInFiles" 进行比较,后者支持一组明确定义的参数,例如搜索查询等。

    【讨论】:

    • 欣赏!谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-08
    • 2021-12-09
    相关资源
    最近更新 更多