News for hackers. Stuff that matters.
Re:A Prettier JavaScript Formatter by Manishearth on Tuesday January 10, 2017 @09:59PM (#13371395)
Theoretically, an editor could. I have yet to see one that does this well. Most do dumb wrapping, with no language sensitivity.

I think it's just a matter of programmer habit now -- folks expect their editor to mirror the code without formatting tweaks.

It gets confusing when you realize that programmers may insert their own indentation and wrapping, and sometimes you want to make this part of the actual file, and sometimes you want to remove it before serializing.

Re:A Prettier JavaScript Formatter by flukus on Tuesday January 10, 2017 @10:16PM (#13371448)
I've been pretty happy with vim and "set breakindent" where the broken line is indented to the parent one. I pretty frequently work with small views of a file.