Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 exptools; site ho95e.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!ho95e!wcs From: wcs@ho95e.UUCP (x0705) Newsgroups: net.unix Subject: Re: Vi query Message-ID: <201@ho95e.UUCP> Date: Tue, 3-Sep-85 16:05:32 EDT Article-I.D.: ho95e.201 Posted: Tue Sep 3 16:05:32 1985 Date-Received: Wed, 4-Sep-85 06:56:42 EDT References: <220@ur-cvsvax.UUCP> Distribution: net Organization: AT&T Bell Labs, Holmdel NJ Lines: 18 > Is there a way in 'vi' to search for the next instance of the > word in which the cursor is presently in using, say, a single .... > This would be a nice command to have while doing spelling corrections in a file. (I'm using vi version 3.9 on System V Rel 2) I tried to define a macro for this that would do the following: insert a / i / ESC yank the WORD into buffer x "xyW execute the buffer @x I put the string i/ESC"xyW@x into register g, and executed it with @g. Unfortunately, I got an error message about "Can't yank inside global/macro", and got kicked out of visual mode. I didn't get the problem if g just contained "xyW , but with the i/ESC at the beginning it dies consistently. For a spelling fixer, I use sfix, which runs spell on a document, then goes through it to find the flagged words, making suggestions for misspelled words. -- ## Bill Stewart, AT&T Bell Labs, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs