zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: midchildan <git@midchildan.org>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] add new features and improvements to the "incarg" ZLE widget
Date: Thu, 15 Feb 2024 16:30:12 +0100	[thread overview]
Message-ID: <58899-1708011012.905219@Bjdj.O9XV.UdPU> (raw)
In-Reply-To: <20240204191938.42759-1-git@midchildan.org>

On 5 Feb, midchildan wrote:
> This brings numerous improvements to the incarg ZLE widget that's used
> to increment an integer under the cursor. I find myself incrementing
> numbers very often when editing commands from shell history. I
> originally used incarg for this, but I missed a couple of features from
> Vim's increment command. The contents of this PR is what I've eventually
> settled on.

I have just applied this after doing some testing. 

I have a couple of minor comments that can perhaps be addressed in a
follow-up patch.

If it fails to find a number going forwards in the buffer, it'd be
useful if it could look backwards too. In contrast to an editor, the
cursor is more often at the very end of the buffer in a shell.

I think that just adding zle -f vichange to the beginning of the
function it will work together with vi-repeat-change (.) which brings it
closer to ^A/^X in vim.

Oliver


  parent reply	other threads:[~2024-02-15 15:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-04 19:19 midchildan
2024-02-05  0:36 ` Bart Schaefer
2024-02-05 16:16   ` midchildan
2024-02-15 15:30 ` Oliver Kiddle [this message]
2024-02-28 19:11   ` [PATCH v3] " midchildan
2024-02-28 20:07     ` [PATCH] incarg: add a backward variant and make it repeatable midchildan
2024-02-29 13:34       ` [PATCH v2] " midchildan
2024-03-04 23:20         ` Oliver Kiddle
2024-03-28 23:07           ` Sho Yuhara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58899-1708011012.905219@Bjdj.O9XV.UdPU \
    --to=opk@zsh.org \
    --cc=git@midchildan.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).