"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: u/ctrl-u/d/ctrl-d bindings for scrolling in tog
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org, Mikhail <mp39590@gmail.com>
Date:
Sun, 12 Jun 2022 16:27:07 +0200

Download raw body.

Thread
On Sun, Jun 12, 2022 at 03:40:41PM +0200, Christian Weisgerber wrote:
> Stefan Sperling:
> 
> > In my opinion it would make sense to match less(1) behaviour and implement
> > half-page scroll for ^D and ^U. Or only offer the full-page scroll bindings
> > used by less(1), i.e. delete our ^D and ^U keybindings again.
> 
> The fundamental difference is that with a numeric prefix ^F/^B
> scroll by screens, and ^D/^U scroll by lines.  It's only if there
> is no numeric prefix that ^D/^U default to scrolling by half a
> screen.  tog(1) does not support numeric prefixes.

I see.

And with a numeric prefix, d/u and ^D/^U are equivalent? Seems to
be the case in my quick testing.

> I also think it's questionable to use 'd' and 'u' as synonyms for
> ^D and ^U.  This is limited to less(1) and not present in vi(1),
> and we may want to reserve these keys for future functionality.

I am fine with d and u behaving like they do in less(1).
Using tog is more like using a pager than using an editor. Copying
key-bindings used in a popular pager like less(1) makes it easier for
more people to start using tog without having to read the man page
in order to achieve basic movement. That is why we support vi(1) movement
keys in addition to the arrow keys.
 
> Personally, I have no use for ^D/^U.  I'm not opposed to adding it
> with "scroll half-screen" semantics, though.

Same here. And I agree that the behaviour we now have for ^D/^U is wrong.
On IRC, Mikhail mentioned plans to implement half-screen scrolling soon
in order to fix this.