gpt4 book ai didi

email - 如何使用 vim 撰写包含悬挂缩进的 format=flowed 电子邮件?

转载 作者:行者123 更新时间:2023-12-02 19:31:13 25 4
gpt4 key购买 nike

是否有一个好方法来配置 vim 发送包含悬挂缩进的 format=flowed 电子邮件?

我的完整 vimrc(用于测试目的)是:

set nocompatible
set fo+=awn
set tw=72
set ai

我正在输入类似的内容:

 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 在除最后一行之外的每一行添加一个尾随空格,每组 fo+=w。它还为悬挂缩进添加了空间。看起来很棒!

我的邮件客户端设置 format=flowed header 。在 Mail.app 或 mutt 中查看此电子邮件时的结果并不漂亮:

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.

该段落正确换行,从某种意义上说,调整阅读器客户端的大小会重新排列它(这不是您在 stackoverflow 上看到的内容,但您明白了)。问题是,“Etiam”和“posuere”以及所有其他已重新连接在一起的行之间有 5 个空格。

vim 中有解决这个问题的方法吗?或者这是 format=flowed 规范的限制?其他人如何处理这个问题?

最佳答案

The paragraph wraps correctly, in the sense that resizing the reader client reflows it (which is not what you'll see here on stackoverflow, but you get the idea). The problem is, there are 5 spaces between "Etiam" and "posuere" and all the other lines that have been joined back together.

这是 RFC 3676 中指定的“format=flowed”MIME 参数的限制。 。规范中没有任何内容允许客户端将前导空格识别为仅用于邮件的纯文本版本的装饰。

RFC 第 4.1 节规定:

If the first character of a line is a space, the line has been space-stuffed (see Section 4.4). Logically, this leading space is deleted before examining the line further (that is, before checking for flowed).

第 4.4 节中引用的“空间填充”:

Space-stuffing adds a single space to the start of any line which needs protection when the message is generated. On reception, if the first character of a line is a space, it is logically deleted. This occurs after the test for a quoted line (which logically counts and deletes any quote marks), and before the test for a flowed line.

因此,符合 RFC 3676 的邮件客户端将从以此类字符开头的每一行中删除单个前导空格,然后(可选)删除单个空格字符后面的所有换行符。此过程不会触及剩余的前导空白

关于email - 如何使用 vim 撰写包含悬挂缩进的 format=flowed 电子邮件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16282728/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com