Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] add new features and improvements to the "incarg" ZLE widget
- X-seq: zsh-workers 52543
- From: Oliver Kiddle <opk@xxxxxxx>
- To: midchildan <git@xxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] add new features and improvements to the "incarg" ZLE widget
- Date: Thu, 15 Feb 2024 16:30:12 +0100
- Archived-at: <https://zsh.org/workers/52543>
- In-reply-to: <20240204191938.42759-1-git@midchildan.org>
- List-id: <zsh-workers.zsh.org>
- References: <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author