[oclug] missing brackets, nesting

Patrick Smith patsmith at pobox.com
Wed Oct 9 10:55:42 EDT 2002


Vic Gedris wrote:
> On Wed, 9 Oct 2002, Bart Trojanowski wrote:
>>Both vim and emacs have brace matching.  emacs has a brace match
>>highlight mode.  
> 
> Vim brace matching:  Press "%" when on a brace, bracket, etc. and it
> will jump to its match.  If it jumps to what you think is the wrong
> place, then you know approximately where to look.

To find, e.g., an unmatched closing brace:  open the file in Vim, insert 
an opening brace at the beginning of the file, put the cursor on the 
opening brace, and press %.  (Might not work if there are unmatched 
braces in strings.)

Also note that Vim has syntax highlighting for most languages.  This may 
help you to find the unmatched brace as well.
-- 
patsmith at pobox.com




More information about the OCLUG mailing list