typescriptvisual-studio-codevscode-extensions

VSCode: How to Focus to an Editor


In my Visual Studio code extension, I currently call workbench.action.moveEditorToNextGroup which moves the editor in code. However, if I call any extra commands, it will use the previous editor group rather than the one I moved it to.

How can I focus to a certain editor such as the one I move to?


Solution

  • It looks like workbench.action.focusFirstEditorGroup should do the tick.

    Alternatively,

    ...

    May also be what you are looking for.

    See docs for full list