Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Vi insert-mode cursor key bindings.



>>I'm curious.... why?
>
>Because vi doesn't bind them, and because <ESC> already has a meaning
>that its use as a prefix would interfere with.
>
>>                      And what happens if you bind them using bindkey?
>
>It'll work as expected.
>
>>Can we use other ESC-prefixed bindings in vi-insert mode?
>
>Yes, just bind them using bindkey.

These last two statements seem to contradict the first.  If an ESC-prefix
will interfere with the command "ESC", then how then does it "work
as expected"?  Or if it "works as expected", how does it interfere?

I can see a lot of e-mail to the list saying "the up-arrow key doesn't
work in vi mode".  I seem to recall the same happening before.


>Have you tried using this binding after you gave i a count?  Look at
>what that binding does; it's a disgusting kludge.

Agreed.  But then I'm hardly likely to be using the cursor keys during
count-prefixed inserts with vi.  (I don't use the cursor keys during
inserts in vi, in fact, in vi, I don't use the cursor keys at all.)

While I'm just as keen to see a good vi emulation from zle, we must
still realise that zsh is a shell, not an editor.  (In vi I don't
use the cursor keys - in zsh I use them all the time.)

There are lots of people out there that think that "up-arrow,return"
is a perfectly reasonable thing to want to do, without having to hit
"esc" first.  (myself included.)


If I can bind them manually - without messing up "esc" on it's own -
then I'm content.  But I think it'll be a problem for other people.


Cheers,



Duncan.



Messages sorted by: Reverse Date, Date, Thread, Author