Path: utzoo!attcan!uunet!olivea!tymix!cirrusl!sunstorm!dhesi From: dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) Newsgroups: comp.editors Subject: Re: spelling from within vi Message-ID: <2732@cirrusl.UUCP> Date: 21 Nov 90 03:58:46 GMT References: <1990Oct31.153710.7865@cec1.wustl.edu> <1990Nov7.005405.461@investor.pgh.pa.us> <59025@microsoft.UUCP> <21197@ttidca.TTI.COM> Sender: news@cirrusl.UUCP Distribution: na Organization: Cirrus Logic Inc. Lines: 31 Here's my spell filter for vi. It's useful for LaTeX files, but works for everything. The stop list contains words one per line, enclosed in backets. E.g.: [Emacs] [Email] [Feb] [Fri] #! /bin/csh -f # filter text through this to see spelling errors summarized in # a compact format; make changes to avoid misinterpretation of # Latex features; and use a stop list for final filtering. # The stop list must be sorted in alphabetic order and is # case-sensitive. R.D. Wed Apr 18 21:17:43 PDT 1990 cat $* | # use stdin or list of files \ sed -e 's/\\/ /g' # replace backslash by blank \ -e 's/^%//' # delete % at beginning of line \ -e 's/\$/ /g' # replace $ by blank \ -e 's/{/ /g' # replace { by blank \ -e 's/}/ /g' # replace } by blank \ | \ spell | \ sed -e 's/^/[/' -e 's/$/]/' | # bracket so complete lines match \ fgrep -v -f ~dhesi/.stoplist | # print only words not in stoplist \ sed -e 's/^\[//' -e 's/\]$//' | # remove brackets \ fmt # ... and display in compact format -- Rahul Dhesi UUCP: oliveb!cirrusl!dhesi