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

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: [rfc] compound keymaps with prefixed count modifier like vi(1)
To:
gameoftrees@openbsd.org
Date:
Wed, 22 Jun 2022 19:53:02 +0200

Download raw body.

Thread
Mark Jamsek:

> but I'd also love to make it operate on G so that nG jumps to line n.
> 
> If there are no objections, I'd be happy to do that, but it might appear
> to introduce some inconsistency for non-vim users given G is used to
> jump to the end of the buffer. That's natural coming from vim but it
> might seem odd for users not familiar with it

<n>G has always been the "go to line n" command in vi(1).  Without
numeric prefix it goes to the last line, because that's the line
whose number you are least likely to know.  But you do know the
number of the first line: 1G.  Simple.

less(1) added g for going to the first line, and treats <n>g as
synonymous to <n>G.  Makes sense.

Once we have numeric prefixes for G, we could delete g again since
it is redundant--but I won't insist. ;-)

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de