I sometimes write long lines of code as I am playing with things in the PowerShell ISE (v4 on Windows 8.1). I find its console window helpful in many ways, but I'm unable to figure out how to make it wrap long lines; it makes me use my mouse when I only want to use the keyboard.
Is there a way to enable automatic line wrapping in the PowerShell ISE? Failing that, can I scroll left/right using the keyboard?
Note: this is a separate question from how to split a command across multiple lines using the backtick (`) operator.
31 Answer
Unfortunately, ISE does not have this functionality... which is weird given that PowerShell (Non-ISE) does.
Unfortunately - the Windows 10/PowerShell 5 ISE isn't any better. The only possible solutions are:
- Tilde/Backtick (`) - which you've already said you know about
- Use the ISE "Copy" function when building a command in the cmdlet explorer and then paste into a separate console - hardly ideal, but it may work
- Develop in a third party application such as Notepad++ and test in ISE/PowerShell
- Work in the non ISE PowerShell command prompt and use tab completion instead of Intellisense.
- Investiagte some other ISE such as PowerShell Studio (paid) which seems to wrap lines OK according to a colleague of mine
Sorry I can't be of any more help.
1