From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25872 invoked by alias); 22 Dec 2015 11:02:31 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21095 Received: (qmail 6810 invoked from network); 22 Dec 2015 11:02:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: vogt@linux.vnet.ibm.com X-IBM-RcptTo: zsh-users@zsh.org Date: Tue, 22 Dec 2015 11:52:10 +0100 From: Dominik Vogt To: zsh-users@zsh.org Subject: Re: transpose-words worked for few seconds Message-ID: <20151222105210.GA27633@linux.vnet.ibm.com> Reply-To: vogt@linux.vnet.ibm.com Mail-Followup-To: zsh-users@zsh.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15122210-0025-0000-0000-000008684156 On Tue, Dec 22, 2015 at 11:41:45AM +0100, Mikael Magnusson wrote: > On Tue, Dec 22, 2015 at 11:34 AM, Sebastian Gniazdowski > wrote: > > I've added to ~/.zshrc: > > bindkey "^[t" transpose-words > > > > I use bindkey -v. Pressing Alt-t worked like 5 times, then stopped. > > Now it never works, even after rebotting machine. I think it can be > > assumed that it doesn't work and worked by accident. > > > > Tried without bindkey -v, with bindkey "^Y" instead of "^[t". Entering > > "a b" and pressing key combination doesn't change anything. Entering > > "a b " swaps "b" and the last space, and does this once, without > > swapping back. > > > > Tried on zsh 5.0.2, 5.0.8 and 5.2. OS X. > > You have to position the cursor on the first character of the word you > want to transpose with the one before it. Theoretically, but practically transpose-words works really strange on one-letter words, probably because it has trouble to properly decide which word the cursor is pointing at. Starting with "a b c d" using transpose-word repeatedly ("*" denotes the cursor position): a b c d* a c b*d (swapped the wrong words and screwed up cursor position) a c d b* a d c*b (ditto) a d b c* a b d*c (ditto) a b c d* ... But aa bb cc dd* aa bb dd cc* aa bb cc dd* ... (zsh 4.3.17) Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany