Edit-File using the PowerShell 3.0 ISE?

Topics: User Forum
Developer
Mar 13, 2013 at 6:42 PM
What's the anticipated mechanism to make Edit-File work well with the ISE editor in PSCX 3.0?

Can I do this simply by changing the editor preference variable, or do I need to replace the Edit-File function?
Coordinator
Mar 13, 2013 at 7:22 PM
Just change the editor pref variable from notepad.exe to powershell_ise.exe.
Developer
Jan 22 at 10:08 PM
Edited Jan 22 at 10:10 PM
This works well most of the time, but in cases where I've got more than one instance powershell_ise.exe running, it sometimes opens the editor in the wrong instance.

It seems like there ought to be a way to use $PSISE.CurrentPowerShellTab to open a file, but I'm not finding it. Am I missing something?
Apr 10 at 3:45 AM
Try $PSISE.CurrentPowerShellTab.Files.Add($filename) to open a file in the current ISE