【问题标题】:VSC API for split in group action用于分组操作的 VSC API
【发布时间】:2021-12-04 13:29:00
【问题描述】:

split in group action 是否有 VSCode api,如下所示?

有点像

const doc = await workspace.openTextDocument({
    language: "text",
  });
const editor = await window.showTextDocument(doc);
editor.edit((edit) => edit.insert(new Position(0, 0), "hello"));
editor.split() // <--- this

【问题讨论】:

  • 找出绑定到键绑定的命令,然后使用扩展 API 执行该命令
  • 我在考虑同样的“作弊”,但我需要确保在破解它之前没有可用的 API。不过谢谢
  • 这不是黑客攻击。有许多内置命令可能永远不会公开 api。 vscode 团队希望您使用 executeCommand() 来处理这些问题。
  • 我不知道 :D 谢谢你

标签: javascript typescript visual-studio-code vscode-extensions


【解决方案1】:

找出绑定到键绑定的命令,然后使用扩展 API 执行该命令,方法是(正如 Mark 指出的)executeCommand()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-06-20
    • 1970-01-01
    • 2010-11-28
    • 1970-01-01
    • 2019-09-14
    • 2021-10-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多