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

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: [rfc] compound keymaps with prefixed count modifier like vi(1)
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Christian Weisgerber <naddy@mips.inka.de>, gameoftrees@openbsd.org
Date:
Wed, 22 Jun 2022 18:00:19 +0200

Download raw body.

Thread
Mark Jamsek <mark@jamsek.com> wrote:
> On 22-06-22 05:23pm, Christian Weisgerber wrote:
> > Mark Jamsek:
> > 
> > > For example, 123j will move down 123 lines, and 3f will scroll down
> > > 3 pages.
> > 
> > FWIW, I would love this, especially with g or G.  Paging down to
> > the middle of tog.c is cumbersome.
> 
> Thanks, naddy! I'm a fan of these modifiers in vim but I'm starting to
> see more value for them in tog now too.
> 
> At present it only works with the existing key maps as a count modifier,
> 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

I'd like something like this too.  FWIW both the vi(1) in base and
less(1) have the 123G thing to jump to line 123, maybe it's just the old
vi(1) to lack it?  I think that it's pretty well-known thought, even
among non vim-users :)