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)
what about curly brace and round ( bracket?
Not sure. I don’t use Netbeans these days…
Same shortcut works for all brackets [, {, (, even for jumping betwen opening and closing xml/html … for that type of file.
I thought that might be the case, but couldn’t confirm… Thanks!
I use Codelobster for it.
Also Codelobster has hotkeys for blocks and tags selections.
I don’t use Windows…
I have a italian keyboard and the key [ is out by pressing Alt gr+[ (I have a multipurpose button)
Thanks Buddy!
Only english keyboards have “[” or “]” keys, most of countries have not theses keys (Layout danish, canadian, french, german, Italian, norwegian, portuguese, spanish, swedish, finish, etc)
(on these the simbol “[” is a subsymbol of other key) ¿how to do this shortcut?
Have you read Casak’s reply? He has an Italian keyboard. I’m afraid I no longer use NetBeans so cannot help.
But the left CTRL key is not recognized if one presses Alt gr. The right CTRL key triggers a curly brace “{“
Sorry buddy – I don’t use NetBeans any more. I’m a Microsoft (would you believe it) Code user or PHPStorm…
Highly likely that the keymapping could have changed. This was an old post.