Hard wrap at 80 characters, or the like. I’d call this the old-school approach.
Let the editor soft wrap (i.e., wrap without inserting carriage returns) everything. Two carriage returns separate paragraphs. I’d call this the new-school approach.
One soft-wrapped line per sentence. That is, each sentence is its own line. I’d call this my approach.
The problem with the old school is that it creates chaos in git diffs. Content moves from one line to the next without any change in semantic meaning.
The new-school approach produces cleaner diffs, but the diffs are too coarse. In writing, I feel that the sentence is the key unit of content. That’s why I promote one-sentence-per line writing.
Does anyone have any feelings one way or the other? Are my concerns about git diffing unfounded? Do we already have a standard in place?
I laughed at this because I hate the no-linebreaks approach for writing text documents precisely because you get a hard to read diff where you spend all your time trying to work out what changed. I’m forever doing fill-paragraph on Latex to prevent these problems. Yes, it does mean that in the paragraph after the change you lose track of what really changed but I prefer that to the madness of a line that is hundreds of characters long.
What about git diff --color-words and GitHub’s prose diff feature? They do real word-by-word diff highlighting. And as far as I know, line breaks will break them, no pun intended (someone correct me if I’m wrong on this).
As for the long lines, you can set your editor to do a soft wrap at any length you please. Responsive text documents!
I saw this, and I was all ready to reply "oh, you just want --word-diff". But I see you’ve already mentioned --color-words, which is broadly the same. Given that, I don’t see the “chaos” you’re worried about.
My preference is “old-school”, but value consistency over any particular standard.
My vote is for hard-wrapping at 78 characters, because I’ve already figured out how to configure my editor to do that, but I don’t have a terribly strong opinion. I’m sure I can figure out how to make my editor do any of these options well enough.
Okay, it seems that most people have their editors set to hard wrap. By default pandoc also creates 72-character wide hard wrapped documents. I’ll ship those as-is and if a document owner wishes to, can change it.
When I start shipping LSST Stack Docs I/we will have to write a style guide to specify this.