I'm kind of ashamed by asking this. But it has been on my mind for a long time. While writing code in c-style languages, many times I find myself lost among mismatching braces! For example look at this:
(function(){
// from JavaScript the good parts
var add_the_handlers = function (notes) {
var i;
for ( i = 0; i < nodes.length; i += 1) {
nodes[i].onclick = function (e) {
alert(i);
};
};
};<p>}());<p>My editor is complaining about a mismatch in braces or prans. How do you find your way out of these situations? :)
I use vim showmatch. <a href="http://vim.wikia.com/wiki/Moving_to_matching_braces" rel="nofollow">http://vim.wikia.com/wiki/Moving_to_matching_braces</a>
The Sublime text editor underlines the opening and matching closing bracket that's currently under the cursor. Easy to miss, I noticed it only after months of using the editor.
To a first approximation, all IDE's and programmer friendly text editors have 'parenthesis' matching modes/features. Certainly any IDE/editor that complains about mismatched 'parenthesis' does.<p>I found turning on parenthesis matching a was a bit disorienting at first because deleting parenthesis worked differently from deleting other characters. Eventually I got used to it.<p>Good luck.