2014/01/25

PowerShell ISE Tip - Navigate between curly brackets

While playing with PowerShell ISE today, I just found out about this little nice trick to navigate between brackets !!! I did not know about this! Pretty cool stuff ! :-)



By positioning your cursor on one of the brackets, you can navigate to its opening/closing one by pressing CTRL +  ]


Update: Looks like you can actually do the same thing with SAPIEN PowerShell Studio 2012

Update#2: The matching actually works for anything the ISE recognizes as a matched pair, for example, () and [] in addition to {}. Unfortunately matching doesn't seem to work inside herestrings and other comments. (Thanks Greg Wojan)

PowerShell ISE - Navigate between brackets using CTRL + }



That's just Awesome !!! :-)


Here is an example using SAPIEN PowerShell Studio 2012



Thanks for reading! If you have any questions, leave a comment or send me an email at fxcat@lazywinadmin.com. I invite you to follow me on Twitter @lazywinadm / Google+ / LinkedIn. You can also follow the LazyWinAdmin Blog on Facebook Page and Google+ Page.

10 comments:

  1. Nice Tip! Didn't know that one, and i use both ISE and PoSH Studio

    ReplyDelete
  2. Lazy, you rock! Thanks for the tip!!
    Carlo

    ReplyDelete
    Replies
    1. Thanks for the comment Carlo ! I know!! This tip is just pure awesomeness :D

      Delete
  3. The matching actually works for anything the ISE recognizes as a matched pair, for example, () and [] in addition to {}. Unfortunately matching doesn't seem to work inside herestrings and other comments.

    ReplyDelete
  4. Salut FX, bonne astuce, mais ça marche pas avec toutes les versions de l'ISE ?

    ReplyDelete
    Replies
    1. Merci pour le commentaire.
      Apparament ca ne fonctionne pas sur la v2.
      Je ne sais pas pour la v3, je vais essayer de trouver une v3 quelque pars.

      Fx

      Delete
    2. Salut FX,
      ça marche pas avec les claviers Azerty FR non plus :)

      Dommage qu'on soit encore mis de côté !

      @+
      Fabien

      Delete