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

Re: Vi insert-mode cursor key bindings.



>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?

The cursor keys will then work, but if you press <ESC> there will be a
delay, while zsh waits for the rest of an escape sequence, before
vi-cmd-mode gets executed.  I am of the opinion that key-generated
escape sequences are a bad idea in general, for this reason.

>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.)

One better: I don't use cursor keys at all.  Their behaviour is too
inconsistent to rely on them.  (The terminals that I regularly use
don't generate ANSI escape sequences, so they wouldn't work in ZLE.)

>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.)

Yes.  There is a case to be made for binding the cursor keys, but ...

>If I can bind them manually - without messing up "esc" on it's own -
>then I'm content.

you *can* bind them manually if you want them, so I think we should
default to the better vi emulation.

>                   But I think it'll be a problem for other people.

Only people that don't read the manual.

-zefram



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