[olug] Unix Tip: WHERE ARE THOSE PARENTHESES?

Unix Guru Universe listserv at ugu.com
Fri Nov 22 19:02:13 UTC 2002


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

			      UNIX GURU UNIVERSE 
			         UNIX HOT TIP

			Unix Tip 2152 - November 22, 2002

		    http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


WHERE ARE THOSE PARENTHESES?

Do you ever lose your way in multiple levels of parentheses
or braces?  If you program in Perl or C, you know what I
mean.  Let the vi "%" command help you.  Move the cursor to 
a parenthesis or brace and type %.  vi will move the
cursor to the corresponding character.  Hit % again and vi 
will return to the original parenthesis or brace.  

For extra power, issue "/{" to find the first open brace.  
Hit "%" twice to find the corresponding brace and return.
Hit "n" to find the next open brace.  This allows you to 
zip through the file checking your program structure.

It makes you feel sorry for Windows-based editors!




--------------------------------------------------------------------------
To Subscribe:    http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe:  http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX 
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU  ADVISES THAT 
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips at ugu.com - Copyright 1994-2001
==========================================================================




More information about the OLUG mailing list