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

RE: PATCH: local keymaps



Andrej Borsenkow wrote:

> Local keymaps imply the ability to switch between keymaps (well, it was
> internally always there). That returns us to the old question - is it possible
> to siwtch keymap on-the-fly? Curently, it seems, that
> 
> bindkey -A viins main
> 
> will change your keymap from emacs to vi. Is it the correct way? Unforunately,
> after
> 
> bindkey -A vicmd main
> 
> no more input is possible. I would expect, that at least `a' would bring me back
> to viins.

For the builtin ones there are -e, -v, and -a (the last one uses
vicmd, but does not link it to main -- as the others do). For
user-defined keymaps this is the intended way, I think.

About switching keymaps using local maps: this is probably a bit of a
misnomer if we think about emacs. They are really override-maps, with
the main keymap still shining through the holes (the holes are where
undefined-key is bound).
But there is one place where I would like local keymaps to be usable:
an option to vared to select such a override-map during editing (and
remove it afterwards).

> May be, it's time to allow for binding of generic keys instead of just escape
> sequences. E.g. in vim (or elvis) you can map charaters Right, Left, Home, F1
> etc. Let's be more user friendly :-) Zsh already has access to termcap/terminfo,
> so it is little overhead - but it at least will make startup files much much
> simpler (assuming, that you work under more than one terminal type)

Yes, I was wishing we had this when adding the keymap to complist (we
would need an option for this to bindkey, though, because `bindkey Up' 
currently binds the two-character sequence `U' `p').

Now, where are our termcap/info experts?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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