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

Re: Meta-tags



On Saturday 12 May 2007, Wingot wrote:
> Hey,
>
> I'm trying to set Alt-h to be a backwards-delete-word, like in emacs,
> but can't figure out how to do this.
>
> I have tried setting in .zshrc a line that says:
> "bindkey '\M-h' backward-delete-word
>

\M means character with high bit added. It is quite unlikely that your 
terminal (emulator) actually produces this when you press Alt-H - I get 
ESC-H:

{pts/1}% xxd
^[h
0000000: 1b68 0a                                  .h.

and this is exactly what run-help is bound to:

{pts/1}% bindkey | grep run-help
"^[H" run-help
"^[h" run-help


So just check what run-help is bound to on your termnial and rebind this 
sequence.

Arguably zsh should treat \M-x and ESC-x interchangeably; I believe it even 
was the case once but my memory fails me here.

P.S. thank you for chance to look at it - this gives me the whole lot of new 
shortcuts to use :)

Attachment: pgpFqfr4O82X6.pgp
Description: PGP signature



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