Thursday, July 19, 2012

Auto-Indenting in PowerShell ISE

Just learned a very amazing thing about the PowerShell ISE (including from PS2)!  If one selects multiple lines, then pressing tab will indent them all.  Pressing shift+tab will un-indent them all.  
This is so wonderful! I don't know how many times over the last year I added an if or try block, and I either manually spaced all the lines or just left it alone.  Now, it takes two seconds, and my code looks amazing!


  1. Aha, nice one, cheers! Knew about using TAB on multiple lines, but got stuck when inserting a large chunk of heavily intended code that needing reverse indenting, so this just saved me a lot of hassle!

  2. I have bookmarked your blog, the articles are way better than other similar blogs.. thanks for a great blog!
    screws Ireland