Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] add new features and improvements to the "incarg" ZLE widget



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