维姆:如何将一组行重新格式化为一行(如果该行是一个句子)?
-
12-09-2019 - |
题
不是重复的 在 Vim 中,将文件中的所有行连接成一行的最简单方法是什么?, ,因为我特别想使用 gq
重新格式化功能。
我曾经在vim中使用80个字符编写latex textwidth
. 。然而,我现在已经切换到无限 textwidth
, ,所以我的台词永远持续下去。
Vim 的重新格式化(例如 gqap)将几行组合成一个段落,将它们包装为 80 个字符。我希望它将它们组合成一行。
IE
Without a \clang{goto} statement in the HIR, we must instead use conditional
statements to check the iteration number.
应该重新格式化为
Without a \clang{goto} statement in the HIR, we must instead use conditional statements to check the iteration number.
当它突出显示并且 gq
被按下。
解决方案
如果你不喜欢“J”作为depesz然后建议做
:set tw=9999
然后做 'GQ'。调整TW您的需求。
其他提示
你为什么不只是“J”后,你的行选择它们?
不隶属于 StackOverflow