zsh-workers
 help / color / mirror / code / Atom feed
* More local keymaps?
@ 1999-06-29 10:51 Andrej Borsenkow
  0 siblings, 0 replies; 2+ messages in thread
From: Andrej Borsenkow @ 1999-06-29 10:51 UTC (permalink / raw)
  To: ZSH workers mailing list

I currently have Alt-RETURN (actually, ESC-RETURN) bound to
accept-and-menu-complete. That's fine and nice ... but after last patches it
seems quite wasteful. There are much more places where I'd like to use these
keys ... and I have to reserve it for very special single case.

What about local keymap for normal menu completion (menucomplete?) It looks
logical - most widgets you'd like to use cannot be used outside of menu
completion in any case. And binding cup -> menu-complete and cdown ->
rverse-menu-complete would give you nice way to scroll through matches even
without menu select.

Releated question: how useful would local keymaps be for user defined widgets?
It differs from current 'bindkey -N newkeymap xxx; bindkey -A newkymap main' in
two aspects:

 - it is sparse (is it really?) You do not need to define all possible bindings
 - it is expected to be removed atomatically when user defined widget exits.

Just an idea ...

/andrej


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: More local keymaps?
@ 1999-06-29 11:15 Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-06-29 11:15 UTC (permalink / raw)
  To: zsh-workers


Andrej Borsenkow wrote:

> I currently have Alt-RETURN (actually, ESC-RETURN) bound to
> accept-and-menu-complete. That's fine and nice ... but after last patches it
> seems quite wasteful. There are much more places where I'd like to use these
> keys ... and I have to reserve it for very special single case.
> 
> What about local keymap for normal menu completion (menucomplete?) It looks
> logical - most widgets you'd like to use cannot be used outside of menu
> completion in any case. And binding cup -> menu-complete and cdown ->
> rverse-menu-complete would give you nice way to scroll through matches even
> without menu select.

Problem is that currently local keymaps are realy very very local ;-)
As soon as we fall back into the main key-read-loop, the local keymap
is removed (in fact, widgets installing a local keymap should remove
it).
However, I agree, that it would be nice to (be able to) do more with
local maps. This menu-completion thing is one (small problem: you
don't get any visual feedback when menucompletion is started or
exited). The vared-option I mentioned is another one. And I would also 
like to add (initially empty) maps for isearch, execute-named-command
and the other builtin widgets which have their own key-loop.

> Releated question: how useful would local keymaps be for user defined widgets?
> It differs from current 'bindkey -N newkeymap xxx; bindkey -A newkymap main' in
> two aspects:

Only if we add a way to read a key sequence (and get the widget name
as the result). But that may be interesting to have anyway... (so that 
you can implement real key-loops in shell code).

>  - it is sparse (is it really?) You do not need to define all possible bindings

Yes, really. Look at complist, it defines only a couple of keys.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-06-29 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-29 10:51 More local keymaps? Andrej Borsenkow
1999-06-29 11:15 Sven Wischnowsky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).