16
$\begingroup$

I've seen that if I click on a square bracket [, I can then use "Check Balance" in the right click menu to see where the matching bracket is.

Is there a way to see different levels of brackets in different colors? The closest that I've found is 'Show larger' for bracket matching syntax errors under preferences.

If there's no way to colorize bracket nesting, is there a keyboard shortcut for "Check Balance" like Shift% in Vim for C code?

$\endgroup$
2
  • 2
    $\begingroup$ If you make it a habit to press a return before each closing bracket you will see it lines up with the Function it belongs to. This is true only if the syntax is correct, otherwise you see incorrect indentations, which, on their own, are also a useful cue to have. $\endgroup$ Commented Apr 1, 2012 at 16:19
  • $\begingroup$ You don't necessarily have to hit Return before each closing bracket; you can go back and put the Return characters in later, when you want to see the brackets lined up. As we all know, Mathematica treats Return differently from Enter -- an unfortunate inheritance from Apple's old development environment, MPW. $\endgroup$ Commented Jul 30, 2012 at 13:51

1 Answer 1

5
$\begingroup$

If there's no way to colorize bracket nesting, is there a keyboard shortcut for "Check Balance" like shift-% in VIM for C-code?

Yes, right from the help file:

Check Balance     Shift+Ctrl+B

$\endgroup$
2
  • 2
    $\begingroup$ Since the gist of the question is about colorization, I'd say shift-ctrl-B could have been a comment, don't you think? $\endgroup$ Commented Apr 1, 2012 at 16:27
  • $\begingroup$ As I now quote in my answer the question specifically asks for the keyboard shortcut as a fallback. $\endgroup$
    – Mr.Wizard
    Commented Jul 29, 2012 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.