Trivial one-liner, but it makes the editing of text cells much more user-friendly.
The one downside this has is that long paragraphs will be stored as single lines, and are hence less version control-friendly. But users who want to manually break lines for this reason can still do so (like they did before).
The ideal solution to keep text lines short for VC but reading cleanly is an editor that can reflow paragraphs intelligently, like most high-power editors can. But I don't think CM is up there yet, and this seems to be the next best thing.
Add linewrapping to text cells (new feature in CodeMirror).
You mentioned that long lines are less version control friendly. Actually this is not true if you use git diff --color-words ;) Editors like emacs allow you to display physically long lines in a window (no need for scrolling to the right) by inserting 'soft' newlines using the visual-line-mode. I use this to VC my latex files.
Yes, that's true. But I was thinking of the default git diff views, that do not use --color-words. But you're totally right, that is the right way to view long-line diffs. Thanks for the visual-line-mode emacs tip, does it only put the soft newlines in whitespace, or will it break words mid-word?
By default it only wraps at a whitespace. I don't know if it supports wrapping at midwords too.
OK, good to know @thisch, thanks for the info. I might give it a try.