[comp.editors] vspell anyone ?

minor@motcid.UUCP (Kevin E. Minor (+1 708 632 7043)) (11/01/90)

Speaking of "spell" and "vi"...

Does anyone have the source for a utility called vspell ?
I remember using it in school.
When you ran it on a file, it found all the spelling errors and
placed them in a "vi-ed" file. You could then correct the errors
and then upon exiting the file, it would correct all instances of
the error.

Is this public domain ? Or a simple script using "spell" and "sed"
or something ?

Please respond via e-mail...

Thanks in advance,
Kevin
-- 
	/-------------------------------------------------------\
	|	Kevin Minor	...uunet!motcid!minor		|
	\-------------------------------------------------------/

walker@hpl-opus.HP.COM (Rick Walker) (11/09/90)

/ hpl-opus:comp.editors / minor@motcid.UUCP (Kevin E. Minor (+1 708 632 7043)) /  7:06 am  Nov  1, 1990 /
> Speaking of "spell" and "vi"...

> Does anyone have the source for a utility called vspell ?
> I remember using it in school.
> When you ran it on a file, it found all the spelling errors and
> placed them in a "vi-ed" file. You could then correct the errors
> and then upon exiting the file, it would correct all instances of
> the error.

I use the following macro with the ispell program:  

map S :1,$w! /tmp/rwspell^M:!ispell /tmp/rwspell^M^M:1,$d^M:r /tmp/rwspell^M

It first writes the whole buffer to a temp file, then runs the ispell
program on the temp file,  deletes the buffer, and reads the tempfile
back in.  If anything bombs out, you can recover with ispell's backup file
in /tmp/rwspell.bak.  (You may want to change the name of the tempfile that
you use so that it will not collide with other users).  Also, be warned
that you will get a collision if you try to run two spells from two 
different windows simultaneously...

----
Rick Walker