hi,

in case somebody uses `vi': I played around with some short-
cuts which allow to substitute  inplace groff  source   text
by  its `groff -Tlatin1' formatted output.

this usually is _not_ what one wants but I think it's useful
for simple text files (such as READMEs and the  like)  where
you  are  not  using  any real markup (except empty lines to
separate paragraphs) and when using text based mail  clients
(mutt,  pine) together with vi, so that you can send reason-
able formatted ascii mails (such as this one  where  I  used
the maps you'll find in the attachment).

The  first  map  reformats  the next paragraph (triggered by
CNTRL-t), the second the whole document (triggered by `;t').

maybe somebody finds this useful.

joerg

"reformat next paragraph:
map  !} groff -Tlatin1 -ms| tr -s '\n'
 }
"reformat whole document:
map ;t 1G !G groff -Tlatin1 -ms| awk 'BEGIN {RS=""; ORS="\n\n"}; {$0=$0; 
print}' 

Reply via email to