Normally one can format the source code in Eclipse with ctrl-shift-f. But the default length of a line is set to 70 charaters. How can I change this to let it be 100 charaters?
That depends on the file type. For Java source files, the setting is at Window > Preferences > Java > Code Style > Formatter, click Edit, then select the Line Wrapping tab.
For other file types it is in other locations. For example, for HTML is is at Window > Preferences > Web > HTML Files > Editor.
Actually, I set my lines DOWN to 65 characters. Years ago when I was doing Macintosh development, some of my co-workers had large monitors. I couldn't read their code properly, because it ran outside the viewing window on my smaller monitor.
I've got a nice wide monitor myself these days, but one thing hasn't changed: I still print on standard-sized paper. Wide lines either get truncated (losing data) or wrapped (ruining the nice pretty formatting). So even though I have sufficient screen space, I still keep the lines fairly narrow. 65 was a more or less arbitrary number that was somewhat influenced by the fact that I started on punched-cards, where the normal width was 72 columns.
Although I use the Java pretty-printer to enforce the text width, I also enable the "print width" option. It places a line down the editor view at the end of column 65 so I know
where things are going to wrap.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
a bit of art, as a gift, the permaculture playing cards