-
Notifications
You must be signed in to change notification settings - Fork 510
Feature Request: Call VSCode commands from $psEditor variable #804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey Trevor! Sorry for the delay. Yep, we'll provide a way to invoke the editor's native commands. |
So would tasks be able to leverage these native commands? Or only from the Integrated Console? I'd love to be able to run my test task and automatically shoot the view over to the Problems pane when the tests complete. I'm sure there are some other use cases for accessing these commands from a task as well. |
Tasks are a different story since they're running in a fresh PowerShell instance that doesn't have any connection to the Editor Services session. This might be a case where VS Code's tasks.json schema should give you the option on what pane should be opened after a task completes, worth filing a feature request since they're doing some major reworking of that format right now. |
That's a good idea - i posted an issue here #27960 |
It would be really cool if a PowerShell script were able to invoke VSCode commands, effectively automating the IDE from PowerShell. This could be exposed via the built-in
$psEditor
variable that's accessible in the VSCode-PowerShell environment.Related to #773, but more broad.
If there's already a way to do this, I'd love to hear it. I've explored the
Workspace
andWindow
variables on the$psEditor
object, along with theGetEditorContext()
method output, and can't find any way to do this right now.Cheers,
Trevor Sullivan
The text was updated successfully, but these errors were encountered: