Vi query
x0705
wcs at ho95e.UUCP
Wed Sep 4 06:05:32 AEST 1985
> 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 at 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
More information about the Comp.unix
mailing list