5 ms·
The main problem I often run into is not wrapping when reading code in an editor, but rather wrapping when reading side-by-side diffs, for example in a github P
by evilotto 5y ago
The main problem I often run into is not wrapping when reading code in an editor, but rather wrapping when reading side-by-side diffs, for example in a github PR or review board RB. You get not only double the code width, but also an extra 6 or so columns on each side for line numbers, plus margins and scrollbars; so 80-column text is really more like 180 columns wide that your window needs to be if you don't want any wrapping.
On my typical developer laptop a full-screen terminal window (which I personally never use) with a system default 11pt font is 202 columns. A modest bump to 13pt drops that to 176 columns, meaning I can't view a side-by-side 80-column wide PR diff without some line wrapping.
That's great that you have a 350-character wide display. Requiring everyone to have acres of screen space, either because they can afford a 34" monitor (or 2 24" monitors) OR because they have good enough eyesight to be able to use a microscopic font is excluding a lot of people.
- lytedev 5y agoLook at your diffs in horizontal splits?
- alisonkisk 5y agoHow? Rotate the text 90deg?
- evilotto 5y agoAFAIR, not an option for RB.
- xxpor 5y agoAdding horizontal diff support was the single thing that made me happy when my company got rid of RB. I can't believe that in 2021 they still haven't added it.
- kelnos 5y agoI dunno; I don't use an external monitor, and code on a 1080p 13" laptop screen. At my normal font size, a full-screen terminal is 190 characters. That's fine; and I try to soft-limit my line width to 120 characters or so. Personally I don't like side-by-side diffs; I'm fine with unified diffs, so I guess I don't run into that problem. But still, I recognize that nearly everyone else I know codes on a larger monitor (you can get a decent, but not great, 27" monitor for $300 or so) with much more horizontal space, and I wouldn't ask them to cater to my small-screen preferences.
- DreamFlasher 5y agoAgain a tooling limitation. Use github or horizontal diffs.
- ninkendo 5y agoYou can deal with line breaks. Is it the end of the world?
- 1vuio0pswjnm7 5y agoNot an IDE user but in textmode I really like using GNU diff -y for a variety of file comparison tasks. There is no word-wrap and it is readable on smaller screens. For example, I can dump two files to single column hex using od and then do diff -y to find the bytes that differ. A nice complement to cmp -b. test $# = 2||exec echo usage: $0 file1 file2\; for small files od -An -tx1 -vw1 < $1 > $1.hex od -An -tx1 -vw1 < $2 > $2.hex diff -y $1.hex $2.hex|tr '\11' '\40'|sed '/[<>|]/s/ / /g'|less -Jj5 -NGp "[<>|]" exec rm $1.hex $2.hex