Why source code editors cannot do beautiful soft wraps?

Again it surfaced that recommending 80 character line lengths, or any hard line lengths, might not be a good idea for the source code layout.

Without making any coherent line of thought:

  • People have different screen widths and you can drag to resize your window
  • My text processor was able to soft wrap sentences back in 1989. Why my source code editor cannot do the same and still retain readable code despite being 200 MB monster of Java code. Writing a logic to lay out readable code with soft word wrapping such not be such a hard task.

Ugly (hardcoded line length):

Screen Shot 2015-12-22 at 09.28.26

 

Ugly #2 (soft wrapping is not context sensitive):

Screen Shot 2015-12-22 at 09.30.04

 Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+

2 thoughts on “Why source code editors cannot do beautiful soft wraps?

  1. > Why my source code editor cannot do the same and still retain readable code despite being 200 MB monster of Java code. Writing a logic to lay out readable code with soft word wrapping such not be such a hard task.

    Because your editor is a 200 MB monster of Java code. Vim is much smaller, and yet it can do word wrap the way you want. It probably is even a built-in feature that does not need any plugin…

  2. It’s not the computer’s fault that it “can’t” wrap long lines.

    It knows how to do it, but humans argue with it and each other about whether it’s readable. The parser doesn’t really care.

Leave a Reply

Your email address will not be published. Required fields are marked *