I have a wide screen like 70% of the people, still the Stack Overflow site has a small resolution support and any embedded code scroll sideways. Is there any settings that can resolved that ? (Probably not.)
Just edit the question and improve code layout. When I got inspired to start contributing to stackoverflow, this is what I did and I believe it helps all of us.
I was surprised how half of the questions that I answered became obvious to me while re-formatting the code to fit within the margins.
The problem here is that many questions are from relatively new programmers, or from people just starting with a new and foreign language. In this case, it can be hard to figure out where and when it is possible to add line breaks without changing the meaning of a piece of code.
So, my answer is that we need to rely on people to improve the lay-out of code-samples, and we cannot really rely on any code beautifiers. Even more so because of the large variety of languages present.
Therefore, we need to encourage people to break down their code across multiple lines, or for editors to improve on the layout of those code snippets. And we should do so in the SO guidelines.
Examples: Python and shell lines require backslashes to continue onto the next line, with exceptions. For the two languages, those exceptions are completely different.
I like to break of shell command lines at logical operators, with an extra level of indent:
command -which -might fail && other command to run || break
No backslashes required here.
With Python, you can break lines inside brackets (function calls, lists). Anything else requires a backslash.