Vim 如何避免使用PAR格式?

Vim 如何避免使用PAR格式?,vim,formatting,Vim,Formatting,PAR的i.m.o.格式比Vim默认格式要好得多 但是有时候PAR不太好。< /P> p、 e 这是一个测试这是一个测试这是一个测试。 这是我的文本这是我的文本这是我的文本。 用PAR 44格式化为: this is a test this is a test this is a t. this is tes my text this is my text this t. this is is my tex t. 这是一个测试这是一个测试这是

PAR的i.m.o.格式比Vim默认格式要好得多

但是有时候PAR不太好。< /P> p、 e

这是一个测试这是一个测试这是一个测试。 这是我的文本这是我的文本这是我的文本。

用PAR 44格式化为:

this is a test this is a test this is a t. this is tes my text this is my text this t. this is is my tex t. 这是一个测试这是一个测试这是一个t。 这是tes我的文本这是我的文本这是t。 这是我的tex t。
有没有办法解决这种形式的问题?

Par功能非常强大,而且非常复杂。我不知道它10%的容量,但我会的 花整整一周的时间来掌握它是值得的

文本中发生的事情与每行的最后一个字符有关。 如您所见,中的每一行:

this is a test this is a test this is a test.
this is my text this is my text this is my text.
以“t.”结尾。PAR手册中的<强>描述< /强>节:

Each output paragraph is generated from the corresponding input paragraph
as follows:

1) An optional prefix and/or suffix is removed from each input line.
2) The remainder is divided into words (separated by spaces).
3) The words are joined into lines to make an eye-pleasing paragraph.
4) The prefixes and suffixes are reattached.

Primaby1Par是猜测<代码> T.<代码>是后缀,从而删除。 在步骤1中删除它们。在所有形式成立之后,PAR提出<代码> T/<代码>回位对齐。 他们

要解决此问题,请传递值为0的
s
选项。这样后缀将是 残疾人

:%!par s0w44

我这么说可能是因为我不太确定。正如我
前面说过我不是大师,可能还有其他原因。

@Daniel DiPaolo:刚刚编辑了你的编辑。PAR不是VIM的插件,它是一个改组段落的程序;在Vim中,它用作过滤器。我认为“新”标记par格式化程序更适合这里。正确的做法是标记为PAR,但显然这个标签已经用于其他目的。@ SIDYLL为我工作,[PAR ]标签基本上是其他“PAR”的无用MISH混搭,所以我想把它改成更好的,但这是完全的。fine@Daniel迪保洛:好吧,我应该在编辑之前问一下。但我认为这一条会更牢固。顺便说一句,如果在第一段中没有提到Vim,这个问题就不会与Vim相关:-P所以Vim par不是最好的选择。哇,太好了,谢谢。正确的解决方案是添加前缀0,因此:
!雷蒙:哎哟!真是个失误!但很高兴你根据我的回答找到了完整的解决方案。
:%!par s0w44