Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site nicmad.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!uwvax!astroatc!nicmad!brown From: brown@nicmad.UUCP Newsgroups: net.unix Subject: Re: Vi query Message-ID: <344@nicmad.UUCP> Date: Wed, 4-Sep-85 22:54:54 EDT Article-I.D.: nicmad.344 Posted: Wed Sep 4 22:54:54 1985 Date-Received: Fri, 6-Sep-85 03:51:05 EDT References: <220@ur-cvsvax.UUCP> <442@cuae2.UUCP> Reply-To: brown@nicmad.UUCP (Mr. Video) Distribution: net Organization: Nicolet Instrument Corp. Madison WI Lines: 19 In article <442@cuae2.UUCP> cwd@cuae2.UUCP (-Chris Donahue) writes: >After using the "/" command in VI to find the first instance of a string, using >the "n" command will find the next instance. (And of course "." will repeat the >last command issued). Careful! The way you worded the above, it sounds as if you can use the '.' command to repeat the last 'n' command. That is not so. The '.' will repeat the last text editing command. If you are looking for a word like 'their' and you wanted to find them and change them to 'there', you could first do a '/their' to find the first one, then use the 'cwthere' command to change the word. The 'cw' is the 'change word' command. Use the 'n' to find the next word and use the '.' to change it to 'there'. If you don't want to change the word that it finds, just press 'n' again. So, as you notice in the example, the '.' will repeat the 'cw' command, not the 'n' search command. A powerful feature that I use alot. -- Mr. Video {seismo!uwvax!|!decvax|!ihnp4}!nicmad!brown