I would like to wrap email text to 72 characters using a command-line program (so that reformatting can be integrated with vim). Quotes using > need to be handled nicely.Lines longer than 72 characters should be wrapped, as well as those shorter than 72 characters and ending with a space. Lines not ending with a space should be left alone so that you can write something likeBest wishes,Greg(with no space after Best wishes,) without it being wrapped into a single line.Where lines are wrapped, a trailing space should be left at the end so that when the email is sent using the format=flowed Content-Type header it's displayed correctly by an email client.Here's some example text:This is an example text file that I would like to reformat using par. I would like this paragraph wrapped to 72 characters because at the moment it's just one long line of text.> This paragraph should also be wrapped > to 72 characters because each line > except the last ends with a space. > The quotes should be handled nicely.These lines shouldn't be wrappedbecause they are shorter than 72 charsand don't have any trailing spaces.par w72q (output below) gets close, but doesn't leave trailing spaces at the end of lines and does wrap the lines with no trailing space:This is an example text file that I would like to reformat using par. Iwould like this paragraph wrapped to 72 characters because at the momentit's just one long line of text.> This paragraph should also be wrapped to 72 characters because each> line except the last ends with a space. The quotes should be handled> nicely.These lines shouldn't be wrapped because they are shorter than 72 charsand don't have any trailing spaces.
Wrap email text in a way that's compatible with format=flowed e.g. using par
vim;mutt;text formatting