Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!brunix!kal From: kal@cs.brown.edu (Keith Lewis (x1136)) Newsgroups: comp.editors Subject: Re: Spell checking in vi Message-ID: <73498@brunix.UUCP> Date: 25 Apr 91 16:20:43 GMT References: <1991Apr16.170158.26075@inel.gov> <2360003@hpcuhc.cup.hp.com> Sender: news@brunix.UUCP Reply-To: kal@kal.math.brown.edu (Keith Lewis) Organization: Brown University Department of Mathematics Lines: 24 In article <2360003@hpcuhc.cup.hp.com> mck@hpcuhc.cup.hp.com (Doug McKenzie) writes: >> Hello. A few years ago there was a posting of some lines that >> could be placed in an 'exrc file to interface with spell(1). One function >> key took all the editor buffer, piped it to spell, and appended the >> output. A second function key cycled through these words one at a time >> and loaded the search buffer. Your could then find and correct the >> bad words easily. >> >> I've lost this. Does anyone still have this... or a better spell- >> checker interface for vi? Here is something I have in my .exrc. The command \sp in vi runs spell on the file and puts the output in a temporary file. Just move the cursor to a line containing a word you want to change and type \/. You get switched back to the original with the cursor underneath the misspelled word. Type \\ to return to the temp file. When you are done \$ removes the temp file. map \sp :!spell % > %.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 map \$ :!rm -f %.sp^V^M -Keith Lewis