I was excited to hear that the PowerShell ISE editor was based on the new WPF editor that will ship in Visual Studio 2010. However I was disappointed when I couldn’t find one of my favorite shortcuts in the script editor: Ctrl+L a.k.a. yank line. Fortunately the object model for the editor is capable enough to support this capability. Here’s a pretty simple custom menu entry with an assigned keyboard shortcut (Ctrl+L) to perform a yank line in the editor:
I find this handy for copying an entire line. I yank the line that I want to copy to the clipboard. Once it is yanked, I can paste it back as many times as I need.
psmdtag:ise – CustomMenu