Rewrapping long lined email quotes

17 views
Skip to first unread message

Chris Lott

unread,
Nov 19, 2012, 2:32:32 AM11/19/12
to vim...@googlegroups.com
I'm trying to take email that has quotes with long lines:

> a really long line here that wraps that has no wraps in it and drives
me crazy

and format them to:

> a really long line here that wraps that has
> no wraps in it and drives me crazy

I've tried the tip(s) at:
http://vim.wikia.com/wiki/Fix_email_quotations_with_long_lines

but I just end up with:

> a really long line here that wraps that has
no wraps in it and drives me crazy

(note the lack of a > on the second line).

This seems like it should be easy, but I am just not making it happen. Help?

c
--
Chris Lott <ch...@chrislott.org>

Marco

unread,
Nov 19, 2012, 2:41:35 AM11/19/12
to vim...@googlegroups.com
2012-11-18 Chris Lott:
I use `par` for that. Unfortunately it does not support Unicode, you
have to patch it. But once you have it running, it will serve you
well.

set formatprg=par\ -w78qer


Marco


Christian Brabandt

unread,
Nov 19, 2012, 3:55:23 AM11/19/12
to vim...@googlegroups.com
On Mon, November 19, 2012 08:32, Chris Lott wrote:
> I'm trying to take email that has quotes with long lines:
>
> > a really long line here that wraps that has no wraps in it and
> > drives
> me crazy
>
> and format them to:
>
> > a really long line here that wraps that has no wraps in it and
> > drives me crazy
>
> I've tried the tip(s) at:
> http://vim.wikia.com/wiki/Fix_email_quotations_with_long_lines
>
> but I just end up with:
>
> > a really long line here that wraps that has
> no wraps in it and drives me crazy
>
> (note the lack of a > on the second line).

Make sure, your formatoptions include 'q' and 'c' (In Vim, check the
output of :set fo? or even :verbose set fo?). I can then successfully
use gqap on such a paragraph and have it nicely reformat and inserting
quotation signs where needed. Other then that, I don't think I set any
other options for writing Emails.

Oh and forget that tip about ':set editor=vim -c...' this is just
plain wrong. The correct approach would make use of filetype plugins
where you can customize all needed options.

regards,
Christian

Ben Fritz

unread,
Nov 19, 2012, 10:00:17 AM11/19/12
to vim...@googlegroups.com

Probably all you're missing is:

:set filetype=mail

Ben Fritz

unread,
Nov 19, 2012, 10:21:03 AM11/19/12
to vim...@googlegroups.com, cbl...@256bit.org
On Monday, November 19, 2012 2:55:37 AM UTC-6, Christian Brabandt wrote:
> On Mon, November 19, 2012 08:32, Chris Lott wrote:
> >
> > I've tried the tip(s) at:
> > http://vim.wikia.com/wiki/Fix_email_quotations_with_long_lines
> >
>
> Oh and forget that tip about ':set editor=vim -c...' this is just
> plain wrong. The correct approach would make use of filetype plugins
> where you can customize all needed options.
>

I've cleaned up the tip page. How's it look now? Feel free to redo any of it, but I think it's more accurate and helpful now.

Christian Brabandt

unread,
Nov 19, 2012, 11:55:46 AM11/19/12
to Ben Fritz, vim...@googlegroups.com, cbl...@256bit.org
Thanks, good work. I cleaned it up even more and added some more
information regarding how to use the mail.vim filetype.

regards,
Christian

Reply all
Reply to author
Forward
0 new messages