Vscode-powershell: Please add extra functionality to $pseditor similar to $psise

Created on 22 May 2017  路  10Comments  路  Source: PowerShell/vscode-powershell

I would like to save files using the command line in VSCODE.

Please add $psise.CurrentFile.SaveAs()

Hackathon Up-for-Grabs

Most helpful comment

https://github.com/PowerShell/vscode-powershell/pull/1261 adds SaveAs() support. Please give it a try and open a new issue if you have feedback.

All 10 comments

Tagging on to this request, I would also like to be able to get information about VSCode as well. Specifically the version of VSCode.

Just to add a comment.

The SaveAs() method, I believe would be on the Type: Microsoft.PowerShell.EditorServices.Extensions.FileContext

$psEditor.GetEditorContext().currentfile | gm

EditorServices.Extensions.FileContext.html#methods

https://github.com/PowerShell/PowerShellEditorServices/pull/590 we've added .Savewhich will be out this week in 1.6.0. That said, a SaveAs where you pass a string as the name for untitled files might be interesting.

A contributor could look at my PR to add .Save as a base for adding .SaveAs:
https://github.com/PowerShell/PowerShellEditorServices/pull/590

I'll keep this open for that... but this issue should be moved to https://github.com/powershell/powershelleditorservices/

https://github.com/PowerShell/vscode-powershell/pull/1261 adds SaveAs() support. Please give it a try and open a new issue if you have feedback.

This is out the door already :)

The version information is the next thing, although maybe not as high priority. The only tricky part is we will need to define a way for arbitrary editors to provide information about themselves. Very possible, but we should consult maintainers for Atom, Sublime and any other editor front-ends.

@rjmholt is this one merged, however not released?

https://github.com/PowerShell/vscode-powershell/pull/1305

@brwilkinson Yep, precisely that.

It is possible to grab the most recent build from CI if you'd like it.

Was this page helpful?
0 / 5 - 0 ratings