编辑摊牌:在句子末尾保持换行符

dre*_*ves 7 html collaboration latex editor

在编辑非WYSIWYG(LaTeX,HTML等)散文时,您可能希望在句子的末尾添加换行符.这有几个好处:

  1. 更容易重新排列句子.
  2. 更容易评论出句子.
  3. 更容易发现连续/过长的句子.
  4. 更容易发表评论句子.

例如:

% The following isn't strictly true; maybe excise or comment out for now:
After all, people who use Word or other WYSIWYG editors are aiding and 
abetting terrorists.
Run Code Online (Sandbox Code Playgroud)

并且最重要的优势可能是它使得在版本控制下的协作编辑变得更加容易.否则你最终会遇到冲突,只是告诉你"这个巨大段落的以下两个版本存在冲突".

但是,在句子末尾保持换行说起来容易做起来难......

As you edit the prose
it will get all chopped up, like this.
Normally you'd do a "reformat paragraph"
to clean it up, but then
you lose the newlines at the ends of your sentences!
Run Code Online (Sandbox Code Playgroud)

以下问题询问如何在emacs中解决此问题:

如何让Emacs填充句子,而不是段落?

我想知道人们如何在其他编辑器中处理这个问题,包括vim,TeXShop,TextMate以及你认为在这里收集有用的任何其他编辑器.关于软包装和硬包装的建议也是受欢迎的.

yun*_*hin 3

我认为最简单的解决方案是仅在句号后添加换行符。这样您的编辑就不会造成线条碎片。

请注意,对于散文,您可以很好地依赖编辑器的换行功能来​​换行长句子 - 除非您坚持像使用代码一样缩进(我在乳胶中不会缩进那么多),