PowerShell ISE v3 (CTP2) addon: Go to Input

by Ravikanth on January 13, 2012

Content Disclaimer: This is preview release content. The final product may or may not contain these features.

Update: @bernd_k replied to this post and mentioned that Ctrl+Down Arrow does the same. Sweet, I had no idea about this key sequence! In any case, treat this post as another trick you can use in PowerShell ISE! :)

This is yet another very short post. In response to my post yesterday about ‘Go to Cursor‘ ISE addon, @Jrich commented saying:

great work. now make that work with V3′s output/command pane that is combined. i scroll through past output and find it hard to get back to where i was on the command i was typing!

I understand your pain, Justin. But, don’t give up on ISE v3 just yet. There is a workaround using $PSISE object model! Here is the code to make it happen. This is simple — as always!

$addonName = "Go To _Input"
$addonkey = "Alt+I"
$ScriptBlock = {
    $psISE.CurrentPowerShellTab.Output.Focus()
}
$psISE.CurrentPowerShellTab.AddOnsMenu.SubMenus.Add($addonName,$ScriptBlock,$addonkey) | Out-Null

There you go! Now, just press Alt+I whenever you find yourself lost in the output! :)

Remember, this works only with PowerShell ISE v3 as both output and command panes are combined!

Ravikanth

A technology enthu and a Windows PowerShell MVP working on SharePoint solutions at Dell Inc. Has deep interests in Windows Server OS & Virtualization.

More Posts - Website - Twitter - Facebook

  • http://jrich523.wordpress.com/ jrich

    Thanks for the effort but i just found out (thanks Bartek!) that CTRL+D and CTRL+I swap between commanD and scrIpt.
    I really need to RTFM

Previous post:

Next post: