Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.unix.questions Subject: Re: Spell-checking a buffer in vi. Need help. Keywords: vi, spell Message-ID: <6437@bsu-cs.UUCP> Date: 31 Mar 89 15:30:10 GMT References: <1856@umbc3.UMBC.EDU> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 31 In article <1856@umbc3.UMBC.EDU> rostamia@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: !{iuvax,pur-ee}!bsu-cs!dhesi ARPA: dhesi@bsu-cs.bsu.edu