Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: transpose-words worked for few seconds
- X-seq: zsh-users 21095
- From: Dominik Vogt <vogt@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: transpose-words worked for few seconds
- Date: Tue, 22 Dec 2015 11:52:10 +0100
- In-reply-to: <CAHYJk3T87qnOh2jAo_QNXxJa-2j_rRQC2N0fCjFrM=NJ7xCarA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVB3RZ0Z9GDikA=i2BDggxVeooO=Oj+m8KKYbPtd_Vh8rw@mail.gmail.com> <CAHYJk3T87qnOh2jAo_QNXxJa-2j_rRQC2N0fCjFrM=NJ7xCarA@mail.gmail.com>
- Reply-to: vogt@xxxxxxxxxxxxxxxxxx
On Tue, Dec 22, 2015 at 11:41:45AM +0100, Mikael Magnusson wrote:
> On Tue, Dec 22, 2015 at 11:34 AM, Sebastian Gniazdowski
> <sgniazdowski@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author