Spell-checking a buffer in vi. Need help.

Rahul Dhesi dhesi at bsu-cs.UUCP
Sat Apr 1 01:30:10 AEST 1989


In article <1856 at umbc3.UMBC.EDU> rostamia at umbc3.UMBC.EDU (Rouben Rostamian)
writes:
[questions re spell checking vi buffer]

1.   To just see spelling errors:

    :w ! spell | fmt


2.   To append spelling errors to buffer:

    :$r !spell % | fmt

Definining mapped keys is left as an exercise for the reader.  You may
need multiple levels of quoting.

Actually I keep a shell script around, called spf, that contains:

     #! /bin/sh
     # filters stdin through spell and fmt, so spelling errors are compactly
     # displayed
     exec cat $* | exec /usr/bin/spell | /usr/ucb/fmt

and I just type ":w ! spf" to see spelling errors on the screen.

(I add the "| fmt" so it all fits in three or four lines at most.
Those unfortunate enough to have traded fragmented disks for fmt can
just omit the "| fmt" from the above commands.)
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee}!bsu-cs!dhesi
                    ARPA:  dhesi at bsu-cs.bsu.edu



More information about the Comp.unix.questions mailing list