* transpose-words worked for few seconds
@ 2015-12-22 10:34 Sebastian Gniazdowski
2015-12-22 10:41 ` Mikael Magnusson
0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Gniazdowski @ 2015-12-22 10:34 UTC (permalink / raw)
To: zsh-users
Hello,
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.
Best regards,
Sebastian Gniazdowski
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: transpose-words worked for few seconds
2015-12-22 10:34 transpose-words worked for few seconds Sebastian Gniazdowski
@ 2015-12-22 10:41 ` Mikael Magnusson
2015-12-22 10:49 ` Sebastian Gniazdowski
2015-12-22 10:52 ` Dominik Vogt
0 siblings, 2 replies; 5+ messages in thread
From: Mikael Magnusson @ 2015-12-22 10:41 UTC (permalink / raw)
To: Sebastian Gniazdowski; +Cc: Zsh Users
On Tue, Dec 22, 2015 at 11:34 AM, Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
> Hello,
> 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.
--
Mikael Magnusson
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: transpose-words worked for few seconds
2015-12-22 10:41 ` Mikael Magnusson
@ 2015-12-22 10:49 ` Sebastian Gniazdowski
2015-12-22 10:52 ` Dominik Vogt
1 sibling, 0 replies; 5+ messages in thread
From: Sebastian Gniazdowski @ 2015-12-22 10:49 UTC (permalink / raw)
To: zsh-users
On 22 December 2015 at 11:41, Mikael Magnusson <mikachu@gmail.com> wrote:
> You have to position the cursor on the first character of the word you
> want to transpose with the one before it.
So "ab cd" will be swapped to "ab dc" when cursor is on "d". That's
quite weird, I think I used different widget long before, it didn't
require to position cursor like that, but maybe I'm wrong
Best regards,
Sebastian Gniazdowski
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: transpose-words worked for few seconds
2015-12-22 10:41 ` Mikael Magnusson
2015-12-22 10:49 ` Sebastian Gniazdowski
@ 2015-12-22 10:52 ` Dominik Vogt
2015-12-22 11:15 ` Sebastian Gniazdowski
1 sibling, 1 reply; 5+ messages in thread
From: Dominik Vogt @ 2015-12-22 10:52 UTC (permalink / raw)
To: zsh-users
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@gmail.com> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: transpose-words worked for few seconds
2015-12-22 10:52 ` Dominik Vogt
@ 2015-12-22 11:15 ` Sebastian Gniazdowski
0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Gniazdowski @ 2015-12-22 11:15 UTC (permalink / raw)
To: vogt, zsh-users
On 22 December 2015 at 11:52, Dominik Vogt <vogt@linux.vnet.ibm.com> wrote:
> a b c d*
> a c b*d (swapped the wrong words and screwed up cursor position)
I cannot reproduce that on 5.0.8. Maybe I remember correctly and
transpose-words used to work differently in past? I tried positioning
cursor after d (nothing happens) and at d (c and d are swapped)
Best regards,
Sebastian Gniazdowski
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-22 11:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-22 10:34 transpose-words worked for few seconds Sebastian Gniazdowski
2015-12-22 10:41 ` Mikael Magnusson
2015-12-22 10:49 ` Sebastian Gniazdowski
2015-12-22 10:52 ` Dominik Vogt
2015-12-22 11:15 ` Sebastian Gniazdowski
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).