Clean up formatting
As many of us share and use snippets from other sources, including the Internet, colleagues etc. sometimes their formatting is destroyed in the copy/paste process or is already destroyed due to a change in a website template for example.
While it's a "nice to have" feature, being able to clean up the formatting (using proper indentation, parentheses spacing etc.) for selected blocks of code would get the code in to a more readable format more quickly.
While everyone formats their code differently, having a few selctable methods of cleaning up would be beneficial such as:
-Keep opening parentheses on same line
-Tab n number of times from parent opening parentheses
-Break long single line commands longer than nnn characters to multi-line commands using backticks
We’re evaluating a model for enabling code formatting via PowerShell modules or ISE add-ons. We’ll let you know if that thinking progresses.
In the meantime, checkout the 'Refactor' capabilities included in ISESteroids (http://www.powertheshell.com/isesteroids/). I think you'll find it does just what you're asking for here.
Sebastian N. commented
So basically a Pretty-Print function?