[PATCH] hgweb: wrap long lines in file source

Jordi Gutiérrez Hermoso jordigh at octave.org
Wed Jun 26 15:32:10 CDT 2013


On 26 June 2013 16:02, Laurens Holst <laurens.nospam at grauw.nl> wrote:

> I do not think any “special education” is needed to explain people how to
> scroll horizontally...

Of course there is. People typically don't know that a mouse wheel is
a middle click. I've had to teach this to several people. Not all
touchpads allow two-finger swipes, and on those that do, not all
people know that this is possible.

> Op 26-06-13 19:21, Jordi Gutiérrez Hermoso schreef:

>> Otherwise, do we have any evidence that users prefer one thing or
>> the other?
>
>
> No, but I tried to present arguments. Do you have evidence?

There is old research against it:

    http://www.usability.gov/pdfs/chapter8.pdf

Ten years later, there is still some flak against it:

    http://ux.stackexchange.com/questions/30623/have-the-attitude-changed-the-last-ten-years-on-horizontal-scrolling-on-web-site

    http://www.experiencesolutions.co.uk/blog/2011/12/12/a-ux-perspective-on-horizontal-scrolling/

> Also, line breaks still have significance in some languages, this wouldn’t
> solve that.

There can be clear indication of line numbers on the left side of the
display that shows that there isn't an actual hard newline here. It's
just a convenience of presentation.

>>> Emacs and vim aside, editors normally don’t wrap lines
>>
>> Kate does it, gedit does it, textmate too, but apparently only
>> whatever editor you use doesn't.
>
> Pretty much every one of them? Eclipse, IntelliJ, Visual Studio,
> MonoDevelop, Netbeans, XCode,

Ah, the IDEs scroll horizontally, the text editors don't. I see why
we're coming from different perspectives here.

> If you’d be editing source code in them you’d be turning off the
> wrap option in a jiffy.

No, I leave it on.

> Also, fwiw, Github doesn’t wrap either, nor does Stack Overflow, nor
> does the Android documentation. Nor will anything else on the web
> that shows source code. I dare you to find a place ;P.

Pastebin does:

    http://pastebin.com/fBVpnY9Q

So does Google code (line 10):

    https://code.google.com/r/darcymason-refactor/source/browse/pydicom/fileio/testfind.py?spec=svn61b7b2ba465756cc22bbc8583ddd3da67c19df58&r=61b7b2ba465756cc22bbc8583ddd3da67c19df58

- Jordi G. H.


More information about the Mercurial-devel mailing list