Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!crdgw1!uunet!brunix!kal From: kal@cs.brown.edu (Keith Lewis (x1136)) Newsgroups: comp.editors Subject: Re: spelling from within vi Message-ID: <56214@brunix.UUCP> Date: 13 Nov 90 16:29:45 GMT References: <1990Nov7.005405.461@investor.pgh.pa.us> <2230002@hpuplca.HP.COM> <1780@b15.INGR.COM> <1792@b15.INGR.COM> Sender: news@brunix.UUCP Reply-To: kal@cs.brown.edu (Keith Lewis (x1136)) Organization: Brown University Department of Computer Science Lines: 17 This is what I use for spell checking in vi: map \sp :!/u/kal/bin/texsp % > %.sp^V^M:e %.sp^V^M^V^M map \/ 0i/^V^[$a/^V^["wdd:w^V^M:e#^V^M@w map \\ :w^V^M:e#^V^M You should replace /u/kal/bin/texsp by whatever spell program you use. From command mode in vi, `\sp' will create a file containing the output of the spell program with the same name as the original extended by .sp and switch you over to it. Put your cursor on the line containing a word you wish to correct and type `\/' from command mode. This will swap you back into the original file with the cursor underneath the first letter of the misspelled word. Type `\\' to switch back to the .sp file. Don't forget to remove the .sp file when you are done. (`map \$ :!rm -f %.sp^V^M' maybe?) The ASCII Kid