* On 31 Jan 2017, Patrick Shanahan wrote: > * David Champion <[email protected]> [01-31-17 19:31]: > > * On 31 Jan 2017, Andreas Doll wrote: > > > > > > I write emails using vim, which provides the handy function gggqG. This > > > function reformats text such that it doesn't exceed (say) 72 characters. > > > The > > > function is superior to e.g. > > > > > > $ fold -s -w 72 inputFile > > > > par is superior to all other text reformatters. > > set display_filter="env PARINIT='rT4bgq B=.,?!_A_a Q=_s>|+' par" > > Your display_filter mangles display of the headers. How to avoid this?
Yeah, I don't actually use this. I suppose vim would do the same,
though.
The avoidance trick would be something akin to:
#!/bin/sh
# Read up to the first blank line unaltered
while read line; do
echo "$line"
case "$line" in
'') break;;
esac
done
# Pump the remainder through par
par 'rT4bgq B=.,?!_A_a Q=_s>|+'
--
David Champion • [email protected]
signature.asc
Description: PGP signature
