Tuesday, April 30, 2013

Re: vim, format=flowed and hanging indents

On 2013-04-30, Michael Williams wrote:
> Is there a good way to configure vim to send format=flowed emails
> that include hanging indents.

No.

> My complete vimrc (for testing purposes) is:
>
> set nocompatible
> set fo+=awn
> set tw=72
> set ai
>
> I'm typing something like:
>
> 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
> posuere dui lorem, et condimentum nulla. Sed pharetra justo nec ante
> fringilla non mattis nisi blandit. Donec molestie ligula dolor.
> Nulla facilisi. Aliquam vel nulla elit, mollis facilisis metus. Sed
> id eros a ante blandit convallis id sit amet elit. Duis malesuada
> lobortis leo a placerat. Sed ut ipsum nisl. Sed pretium mauris vitae
> velit sollicitudin iaculis.
>
> vim adds a trailing space to each line except the last, per set
> fo+=w. It also adds spaces for the hanging indent. It looks great!
>
> My mail client sets the format=flowed header. The result when this
> email is viewed in either Mail.app or mutt is not pretty:
>
> 1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam posuere dui lorem, et condimentum nulla. Sed pharetra justo nec ante fringilla non mattis nisi blandit. Donec molestie ligula dolor. Nulla facilisi. Aliquam vel nulla elit, mollis facilisis metus. Sed id eros a ante blandit convallis id sit amet elit. Duis malesuada lobortis leo a placerat. Sed ut ipsum nisl. Sed pretium mauris vitae velit sollicitudin iaculis.
>
> In case my/your news client screws this up, all the lines have
> been correctly joined back together and the text reflows as
> expected when you resize the window. Fine. But there are 5 spaces
> between "Etiam" and "posuere" at all the other joins.
>
> Is there a fix for this in vim? Or is this a limitation of the
> format=flowed spec? If so, how do other people handle this?

The Format=Flowed spec, RFC 3676, does not provide for indentation
except for the first line of a paragraph. All lines are considered
to start at the left margin and are wrapped to the left margin. See
section 3.1.

Your example paragraph is being flowed correctly according to the
RFC.

I handle it by not using format=flowed.

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: