Add linewrapping to text cells (new feature in CodeMirror). #1330

Merged
merged 1 commit into from Jan 26, 2012

Projects

None yet

3 participants

@fperez
Owner
fperez commented Jan 26, 2012

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.

Contributor
thisch commented Jan 26, 2012

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.

Owner
fperez commented Jan 26, 2012

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?

Contributor
thisch commented Jan 26, 2012

By default it only wraps at a whitespace. I don't know if it supports wrapping at midwords too.

@ellisonbg ellisonbg merged commit 22882e4 into ipython:master Jan 26, 2012
Owner
fperez commented Jan 27, 2012

OK, good to know @thisch, thanks for the info. I might give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment