Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
1  
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. –  Sjoerd C. de Vries Apr 1 '12 at 16:19
    
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. –  Ralph Dratman Jul 30 '12 at 13:51
add comment

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
2  
Since the gist of the question is about colorization, I'd say shift-ctrl-B could have been a comment, don't you think? –  Sjoerd C. de Vries Apr 1 '12 at 16:27
    
As I now quote in my answer the question specifically asks for the keyboard shortcut as a fallback. –  Mr.Wizard Jul 29 '12 at 18:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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