disclaimer: for simplicity sake, brackets will refer to brackets, braces, quotes, and parentheses in the couse of this question. Carry on.When writing code, I usually type the beginning and end element first, and then go back and type the inner stuff. This gets to be a lot of backspacing, especially when doing something with many nested elements like: jQuery(function($){$('#element[input=file]').hover(function(){$(this).fadeOut();}));Is there a more efficient way of remembering how many brackets you've got open ?Or a second example with quotes:<?php echo '<input value='.$_POST['name'].' />; ?>
What's Your Method of not forgetting the end brackets, parentheses
coding style;efficiency;methodology
I start out like this {}, then usually fill them with something. Whenever you type {, type a corresponding } and stick it on a new line. The worst thing you have to do in that case is fix indentation prior to committing.Good syntax highlighters will often alert you to a problem, but not always. My preferred editor KATE, for instance, choked on a JSON formatted 'printf style' variadic argument string.Don't trust bracket and paren highlighting! Always close what you open immediately after opening it and then fill in the gaps.