Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Jan 26, 2012

Conversation

fperez
Copy link
Member

@fperez 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.

@twmr
Copy link
Contributor

twmr 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.

@fperez
Copy link
Member Author

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?

@twmr
Copy link
Contributor

twmr commented Jan 26, 2012

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

ellisonbg added a commit that referenced this pull request Jan 26, 2012
Add linewrapping to text cells (new feature in CodeMirror).
@ellisonbg ellisonbg merged commit 22882e4 into ipython:master Jan 26, 2012
@fperez
Copy link
Member Author

fperez commented Jan 27, 2012

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

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Add linewrapping to text cells (new feature in CodeMirror).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants