From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23590 invoked by alias); 15 Aug 2016 04:42:35 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39037 Received: (qmail 18401 invoked from network); 15 Aug 2016 04:42:35 -0000 X-Qmail-Scanner-Diagnostics: from mx0a-001b2d01.pphosted.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(148.163.156.1):SA:0(0.0/5.0):. Processed in 0.148655 secs); 15 Aug 2016 04:42:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: hanpt@linux.vnet.ibm.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at linux.vnet.ibm.com does not designate permitted sender hosts) X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: hanpt@linux.vnet.ibm.com Date: Mon, 15 Aug 2016 10:22:50 +0800 From: Han Pingtian To: zsh-workers@zsh.org Subject: Re: [PATCH] enable number argument for transpose-words Mail-Followup-To: zsh-workers@zsh.org References: <20160801103212.GA24067@localhost.localdomain> <20160812025402.GA5319@localhost.localdomain> <20160812102918.5ad0f649@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160812102918.5ad0f649@pwslap01u.europe.root.pri> User-Agent: Mutt/1.6.2 (2016-07-01) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16081502-0028-0000-0000-0000055E6AB9 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005595; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000181; SDB=6.00744743; UDB=6.00350901; IPR=6.00517296; BA=6.00004660; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012335; XFM=3.00000011; UTC=2016-08-15 02:23:03 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16081502-0029-0000-0000-00002E5DA67B Message-Id: <20160815022250.GA3748@localhost.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-15_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608150027 On Fri, Aug 12, 2016 at 10:29:18AM +0100, Peter Stephenson wrote: > On Fri, 12 Aug 2016 10:54:02 +0800 > Han Pingtian 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.