Netbeans – Goto matching brace/bracket

If using Netbeans for your development and you have a horrendous spagetti coded “if” statement, you can use a keyboard shortcut to go to the matching opening or closing bracket.

Simply click on the first (or last) bracket, and then press CTRL + [ and Netbeans will move the cursor to the matching bracket. Its not CTRL + ] for the reverse, its CTRL + [ for both.

I can confirm that this works in Netbeans 7.0.1 on Linux and Mac (seeing as its a Java app, it should be the same on Windows too)

 

8 comments on “Netbeans – Goto matching brace/bracket

  1. Yatin February 25, 2015 12:11 pm

    what about curly brace and round ( bracket?

    • admin March 2, 2015 9:33 am

      Not sure. I don’t use Netbeans these days…

    • Fernando March 10, 2015 5:18 pm

      Same shortcut works for all brackets [, {, (, even for jumping betwen opening and closing xml/html … for that type of file.

      • admin March 10, 2015 5:46 pm

        I thought that might be the case, but couldn’t confirm… Thanks!

    • admin March 12, 2015 9:02 am

      I don’t use Windows…

  2. Casak November 11, 2016 8:30 pm

    I have a italian keyboard and the key [ is out by pressing Alt gr+[ (I have a multipurpose button)

  3. Ikram September 25, 2017 11:47 am

    Thanks Buddy!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>