Subject: Re: [PATCH] enable number argument for transpose-words
From: Han Pingtian <[email-masked]>
To: [email-masked]
Date: Mon, 15 Aug 2016 10:22:50 +0800
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Fri, Aug 12, 2016 at 10:29:18AM +0100, Peter Stephenson wrote:
> On Fri, 12 Aug 2016 10:54:02 +0800
> Han Pingtian <[email-masked]> wrote:
> > Any suggestions to this one, please? Thanks in advance.
> 
> Thanks, I've committed that.  This describes what it does.
> 
> pws
> 
> diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
> index eaca1b3..aa219dc 100644
> --- a/Doc/Zsh/zle.yo
> +++ b/Doc/Zsh/zle.yo
> @@ -1948,6 +1948,12 @@ to the left.
>  tindex(transpose-words)
>  item(tt(transpose-words) (tt(ESC-T ESC-t)) (unbound) (unbound))(
>  Exchange the current word with the one before it.
> +
> +With a positive numeric argument em(N), the word before the cursor is
> +transposed with the following em(N) words.
> +
> +With a negative numeric argument em(-N), the word after the cursor
> +is transposed with the preceding em(N) words.
>  )
>  tindex(vi-unindent)
>  item(tt(vi-unindent) (unbound) (tt(<)) (unbound))(
Thanks. But both positive and negative numeric argument would transpose
current word with preceding N/-N word. The negative argument only make
cursor doesn't change its position after the transpostion.