Date: Thu, 4 Sep 2008 10:32:30 -0700 From: Gary Kline <kline@thought.org> To: Karl Vogel <vogelke+software@pobox.com> Cc: freebsd-questions@freebsd.org Subject: Re: script to assist ASCII text Message-ID: <20080904173230.GA33782@thought.org> In-Reply-To: <20080904013330.B1E92B7BD@kev.msw.wpafb.af.mil> References: <1219723211.4994.165.camel@localhost> <20080904013330.B1E92B7BD@kev.msw.wpafb.af.mil>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 03, 2008 at 09:33:30PM -0400, Karl Vogel wrote: > >> On Mon, 25 Aug 2008 21:00:10 -0700, > >> Gary Kline <kline@thought.org> said: > > G> This had eluded me for years and it may not be possible, but here goes. > G> I write using vi or, less frequently vim. Is there any sh script that > G> would make sure that there were exactly one space ('\040') between words, > G> and three spaces between sentences? My definition of "a sentence" is a > G> string of words that ends in a period or question-mark, exclamation-mark, > G> or ellipse ("... . || ... ? || ... !) Also, any dash "--" could not have > G> any whitespace around it. > > I like a similar setup -- one space between words, sentences ending > with a period followed by two spaces. The GNU version of "fmt" handles > this pretty well. Here's the first part of your message, formatted to > 50-character-wide lines, with the type of spacing that drives me nuts: > [[ ... ]] > which makes strings like "U.S.A." look like the end of a sentence > even when they're not. This should give you some ideas. > Thanks much. I sure could have used this yersterday!! Esp'ly for getting rid of people who send me GUI mail that's readable-but-messy using Mutt. (******) -gary -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080904173230.GA33782>