zsh-users
 help / color / mirror / code / Atom feed
* Listing keybindings
@ 2005-11-04 11:23 Sebastian Stein
  2005-11-04 11:31 ` DervishD
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sebastian Stein @ 2005-11-04 11:23 UTC (permalink / raw)
  To: zsh-users

Hi,

how can I find out the current key bindings? Is there something similar like
the "alias" command returning me all aliases?


Sebastian


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

* Re: Listing keybindings
  2005-11-04 11:23 Listing keybindings Sebastian Stein
@ 2005-11-04 11:31 ` DervishD
  2005-11-04 11:33 ` Sebastian Stein
  2005-11-04 11:54 ` Nikolai Weibull
  2 siblings, 0 replies; 7+ messages in thread
From: DervishD @ 2005-11-04 11:31 UTC (permalink / raw)
  To: Sebastian Stein; +Cc: zsh-users

    Hi Sebastian :)
 * Sebastian Stein <seb_stein@gmx.de> dixit:
> how can I find out the current key bindings? Is there something similar like
> the "alias" command returning me all aliases?

    bindkey, with no options, to list the current keymap.

    bindkey -M <KEYMAP> to list the "KEYMAP" keymap.

    bindkey -l lists the available keymaps.

    If you add -L to the first and second examples, the output will
be the commands needed to create the current bindings.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...


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

* Re: Listing keybindings
  2005-11-04 11:23 Listing keybindings Sebastian Stein
  2005-11-04 11:31 ` DervishD
@ 2005-11-04 11:33 ` Sebastian Stein
  2005-11-04 11:55   ` DervishD
       [not found]   ` <200511041614.59234.arvidjaar@mail.ru>
  2005-11-04 11:54 ` Nikolai Weibull
  2 siblings, 2 replies; 7+ messages in thread
From: Sebastian Stein @ 2005-11-04 11:33 UTC (permalink / raw)
  To: zsh-users

Sebastian Stein <seb_stein@gmx.de> [051104 12:28]:
> how can I find out the current key bindings? Is there something similar like
> the "alias" command returning me all aliases?

Ok, stupid question, of course I can just type "bindkey".

I read in one tutorial, that I can insert a command like "xfig" and press
ESC+? to call the alias which-command. In the turorial it is said to be the
default behaviour. However, I can't find this keybinding.

The tutorial:
http://www-128.ibm.com/developerworks/linux/library/l-z.html?open&l=335,t=gr,p=Z-Shell

The paragraph I'm talking about:

"It's worth mentioning the "which-command" function which is useful here.
After completion, or after typing a command in, run the function, which by
default is bound to Esc-? press and release Escape, then press "?")."


Any ideas about it, or is the tutorial just outdated?


Sebastian


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

* Re: Listing keybindings
  2005-11-04 11:23 Listing keybindings Sebastian Stein
  2005-11-04 11:31 ` DervishD
  2005-11-04 11:33 ` Sebastian Stein
@ 2005-11-04 11:54 ` Nikolai Weibull
  2 siblings, 0 replies; 7+ messages in thread
From: Nikolai Weibull @ 2005-11-04 11:54 UTC (permalink / raw)
  To: zsh-users

Sebastian Stein wrote:

> how can I find out the current key bindings? Is there something
> similar like the "alias" command returning me all aliases?

Look up 'bindkey' in the manual.

        nikolai

-- 
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


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

* Re: Listing keybindings
  2005-11-04 11:33 ` Sebastian Stein
@ 2005-11-04 11:55   ` DervishD
  2005-11-04 14:43     ` Sebastian Stein
       [not found]   ` <200511041614.59234.arvidjaar@mail.ru>
  1 sibling, 1 reply; 7+ messages in thread
From: DervishD @ 2005-11-04 11:55 UTC (permalink / raw)
  To: Sebastian Stein; +Cc: zsh-users

    Hi Sebastian :)

 * Sebastian Stein <seb_stein@gmx.de> dixit:
> I read in one tutorial, that I can insert a command like "xfig" and press
> ESC+? to call the alias which-command. In the turorial it is said to be the
> default behaviour. However, I can't find this keybinding.

    But, according with the info manual of version 4.2.5,
which-command exists as a widget, and by default is bound to ESC-?

    Try binding it to another combination just to test.

    And oh, BTW, you have to have a shell function, alias or command
called "which-command", of course, because the widget calls it (in
fact, it does exactly that, calls "which-command CMD", where "CMD" is
the current command in the editor buffer.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...


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

* Re: Listing keybindings
  2005-11-04 11:55   ` DervishD
@ 2005-11-04 14:43     ` Sebastian Stein
  0 siblings, 0 replies; 7+ messages in thread
From: Sebastian Stein @ 2005-11-04 14:43 UTC (permalink / raw)
  To: zsh-users

DervishD <zsh@dervishd.net> [051104 13:06]:
> > I read in one tutorial, that I can insert a command like "xfig" and press
> > ESC+? to call the alias which-command. In the turorial it is said to be the
> > default behaviour. However, I can't find this keybinding.
> 
>     But, according with the info manual of version 4.2.5,
> which-command exists as a widget, and by default is bound to ESC-?
> 
>     Try binding it to another combination just to test.
> 
>     And oh, BTW, you have to have a shell function, alias or command
> called "which-command", of course, because the widget calls it (in
> fact, it does exactly that, calls "which-command CMD", where "CMD" is
> the current command in the editor buffer.

The problem is, as the other poster said, that I'm using the vi keymap.
There this keybinding is not defined. I added now the following line to my
.zshrc and it works great:

bindkey '^P' which-command

Thanks for your help,


Sebastian


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

* Re: Listing keybindings
       [not found]   ` <200511041614.59234.arvidjaar@mail.ru>
@ 2005-11-04 14:44     ` Sebastian Stein
  0 siblings, 0 replies; 7+ messages in thread
From: Sebastian Stein @ 2005-11-04 14:44 UTC (permalink / raw)
  To: zsh-users

Andrey Borzenkov <arvidjaar@mail.ru> [051104 14:52]:
> This is bound by default in emacs mode; no in vi. Which mode are you using? Do 
> you have environment EDITOR=vi (or VISUAL=vi) set by any chance?

You are right, I'm using vi keymap and not emacs. Now I defined a binding by
myself.

Sebastian


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

end of thread, other threads:[~2005-11-04 14:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-04 11:23 Listing keybindings Sebastian Stein
2005-11-04 11:31 ` DervishD
2005-11-04 11:33 ` Sebastian Stein
2005-11-04 11:55   ` DervishD
2005-11-04 14:43     ` Sebastian Stein
     [not found]   ` <200511041614.59234.arvidjaar@mail.ru>
2005-11-04 14:44     ` Sebastian Stein
2005-11-04 11:54 ` Nikolai Weibull

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