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

Re: History Up key

(Relocated to -workers)

On Mar 13,  8:22pm, Zefram wrote:
> Subject: Re: History Up key
> A.  It would be a bad idea to have arrow keys bound by default in vi
>     insert mode.  Emacs mode and vi command mode don't have the same
>     problems, because <esc> itself isn't bound to anything in those
>     keymaps.

Obviously, though, users want it, or all those vi clones wouldn't have put
in hacks to make it work.

> B.  Adapting the arrow key sequences to the local terminal is problematic.
>     Binding things like ^H as arrow key sequences will cause big problems,
>     so at minimum terminals where arrow keys don't send escape sequences
>     should be treated as having no arrow keys.

This suggests that any and all keybindings read from term(cap|info) should
be bound BEFORE any of zsh's regular defaults, so that e.g. if down-arrow
sends ^J, the binding to down-history is replaced by one for accept-line.

>     With that heuristic in
>     place, the only problem with adaption is the issue of programmatically
>     knowing where those bindings are.

Which should be easier with the termcap and terminfo modules ...

> C.  The documentation should contain advice on how to turn *on* key
>     bindings for arrow keys in vi insert mode.  This avoids the issue
>     of difficulty in turning off the bindings.

Should I commit my zkbd script?  If so, where -- under Misc/ ?
(See zsh-users/3563)

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