[vox-tech] Email formatting fun

Karsten M. Self vox-tech@lists.lugod.org
Thu, 22 Apr 2004 00:09:30 -0700


--jkO+KyKz7TfD21mV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

on Tue, Apr 20, 2004 at 10:23:20AM -0700, Jonathan McPherson (jamcp@ucdavis=
=2Eedu) wrote:
> Hey all,
>=20
> I use mutt to read my email, and vim to compose messages.  Judging from
> the headers on the mail messages around the list, many of you are in the
> same boat.
>=20
> I like my email to be as well-formatted as possible. =20

I'm assuming you're referring to _outgoing_ mail.  Though I'm known to
reflow incoming mail, unless I delete it, particularly for shit that's
been horribly mangled through several passes of Yahoo, Hotmail, and
OutHouse.

> Towards that end, I use a paragraph formatter named par[1] to format
> my email messages.  par reflows paragraphs and chooses line breaks
> that are optimal (in some sense), using a dynamic programming
> algorithm that outperforms the greedy one used by "fmt" and most other
> mail clients.

I find the following vim settings solve most of my problems:

    set autoindent
    set ignorecase
    set incsearch
    set magic
    set nowrapscan
    set shiftwidth=3D4
    set showmatch
    set smartcase
    set tabstop=3D8
    set textwidth=3D72
    set background=3Ddark     " makes syntax highlighting lighter

I also use a set of 'abbreviation' substitutions to fix common typso and
standardize some commonly used expressions.  The formulation with
trailing '_' reverts to the unmunged value.  Note that these
substitutions apply *both* in text and in *searches*, which always bites
me:

    " Make RMS happy and other PC PCing...
    :ab Linux GNU/Linux
    :ab Linux_ Linux
    :ab Windows legacy MS Windows
    :ab Windows_ Windows
    :ab StarOffice StarOffice, that bloated stuck pig of an office suite,
    :ab StarOffice_ StarOffice
    :ab RIAA RIAA -- a transparent mask for Sony (Japan), EMI (England), Wa=
rner, BMG (Germany), Universal (France), the so-called American recording i=
ndustry, to hide behind --
    :ab RIAA_ RIAA=20


    " There are no typso in this document!
    :ab Eg: E.g.:
    :ab eg: e.g.:
    :ab (Eg: (E.g.:
    :ab (eg: (e.g.:
    :ab consistant consistent
    :ab Consistant Consistent
    :ab consistantly consistently
    :ab Consistantly Consistently
    :ab Idiological Ideological
    :ab idiological ideological
    :ab Miniscule Minuscule
    :ab miniscule minuscule
    :ab Occaisionally Occasionally
    :ab occaisionally occasionally
    :ab Occaisional Occasional
    :ab occaisional occasional
    :ab Fo Of
    :ab fo of
    :ab Seperate Separate
    :ab seperate separate
    :ab Seperately Separately
    :ab seperately separately
    :ab Sequitor Sequitur
    :ab sequitor sequitur
    :ab Sequiter Sequitur
    :ab sequiter Sequitur
    :ab Teh The
    :ab teh the
    :ab het the
    :ab hte the
    :ab Taht That
    :ab taht that

And finally:
    " For mail margins:
    au FileType mail set textwidth=3D72 expandtab

After this, I occasionally toss in a 'gqip' when I'm reflowing reedited
paragraphs.



Peace.

--=20
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
    In 2002, everyone discovered that everyone else is using Linux.

--jkO+KyKz7TfD21mV
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAh2+pefG8443k044RAnqOAJ42QwhHXACopsKSZrP1D7wfopjqyQCfewkV
TaU5lbH1goGzZBN82swvR04=
=7eMI
-----END PGP SIGNATURE-----

--jkO+KyKz7TfD21mV--