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

Re: Multi-level keybinding?



On Sat, Dec 20, 2008 at 19:55, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> Ctrl-e is normally bound to "end-of-line" which seems like a pretty
> commonly-used operation to choose to override ... unless you're in
> vi-mode, I suppose.

^E is my playground binding as I personally use the end key,
anyway. Production use will be ^X. Let's switch over to ^X in the
following emails to stick with the standard binding key.


> Reading this I'm not sure what output you want from "binding_overview".
> Since ^E is a prefix of other keys, it's only going to get invoked if
> they press ^E and then wait a bit.  Once binding_overview does get
> control, is it intended to immediately produce a listing of all the
> available bindings, or to wait for a key and then explain that one?  If
> the latter, is it your intention that they retype the ctrl-e or do you
> mean e.g. to have <ctrl-e><pause><i> explain insert-unicode-char?

Ideally, I would want the keybinding for ^X to be executed each and
every time a keybinding starting with ^X is called. But ZLE should
still listen for another key.
I.e. both the widget for ^X and ^Xn are executed when I press ^Xn
a single time.


> I'm also confused about the difference between "make the widget" do
> something and "within the shell".  You mean you'd prefer that there
> is a built-in solution to one you'd have to script yourself?

See above. I hope I was able to express what I meant in a better
way, this time.


>    describe-key-briefly

Neat!


>    read-command

Yah, that is what I planned on using in case my idea of double-bound
keys does not work out.


> So at least for now you probably need to bind this to a sequence that
> is not a prefix of any other binding.

I thought about this some more and I will most likely end up using
^X^X for the description widget.


Thanks for your input!
Richard



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