Hacker News new | past | comments | ask | show | jobs | submit login

Why is it usable for word processing but unusable for programming?



Word processors soft wrap text to whatever window width you want. Code editors need to be as wide as the code.


In the office I have two 1080x1920 panels, which can each display two columns of code with room to spare. I use the X11 6x13 “fixed” font, and emacs with fringes but without scrollbars, so each column is a few more than 80 characters wide.

At home I have two 1200x1920 panels, a bit more horizontal breathing room, but my code is still less than 80 wide :-)


Atom, VSCode, Dreamweaver and others also use soft wrap by default.


Soft-wrapped code tends to be pretty difficult to read though. Certainly much more difficult than wrapped prose. Personally I prefer horizontal scrolling over wrapping code pretty much always (at least on a mac where horizontal scrolling is easy).


Xcode used to be really good at softwrapping code. It was so useful with the assistant editor on a laptop screen. It got worse at some point around Xcode 8 or 9, which was a shame.


(further to this, I realised earlier that it got better again in Xcode 11 - it no longer double-indents wrapped lines)


I can't imagine an editor without soft wrap as the default.

Sublime, wordpad, vim all use soft wrap.


Usually word processing and typesetting have word-wrap enabled. This is undesirable in a program. The 9:16 screen may still be useful for programming though, because it's nice to have some documentation out on another screen.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: