Home > Enterprise >  VSC API for split in group action
VSC API for split in group action

Time:10-17

Is there VSCode api for split in group action as seen below?

menu showing split in group command

Somthing like

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

CodePudding user response:

Find out which command is bound to the keybinding and then execute that command with the extension API, method is (as Mark points out) executeCommand()

  • Related