Vi query

Bill Vaughn bill at ur-cvsvax.UUCP
Sun Sep 1 10:18:36 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
keystroke (obviously one could use the '/' and enter the word by hand) ?
If there is a way to use a named buffer in a search string then it
could be done I guess, but from my reading and testing I don't think it's
possible to do that. Are there any other possible ways short of hacking 'vi'?
Have I missed something obvious? Asssuming I have not, I feel this might
be a useful 'feature' to add to 'vi'.  Comments?

This would be a nice command to have while doing spelling corrections
in a file. The following alias puts one into 'vi' with the list
of 'misspelled' words appended. The cursor is on the last word.

alias sp 'spell \!* >> \!* ; vi + \!*'

Now one could hit that magic key, and each word in the list could be quickly
found and corrected. When the cursor comes full cycle (using the 'n' command),
the word could be deleted and the process repeated until the appended list is
exhausted.  That is as close to an automatic spelling correcter as I want
or need.

If you feel that any answers you may have would be useful to
everybody on the net, please post. Otherwise just send mail.

		Bill Vaughn
		Center for Visual Science
		UNIV. OF ROCHESTER
		{allegra,seismo,decvax}!rochester!ur-cvsvax!bill



More information about the Comp.unix mailing list