* Meta-tags
@ 2007-05-12 10:00 Wingot
2007-05-12 10:32 ` Meta-tags Andrey Borzenkov
0 siblings, 1 reply; 6+ messages in thread
From: Wingot @ 2007-05-12 10:00 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 352 bytes --]
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
But Alt-h still runs help on the currently typed command.
It almost appears as if Alt-H is hardwired to help as far as I can tell.
Regards,
Wingot
[-- Attachment #2: Type: text/html, Size: 599 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Meta-tags
2007-05-12 10:00 Meta-tags Wingot
@ 2007-05-12 10:32 ` Andrey Borzenkov
2007-05-12 15:10 ` Meta-tags Peter Stephenson
2007-05-12 16:30 ` Meta-tags Bart Schaefer
0 siblings, 2 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2007-05-12 10:32 UTC (permalink / raw)
To: zsh-users; +Cc: Wingot
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
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 #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Meta-tags
2007-05-12 10:32 ` Meta-tags Andrey Borzenkov
@ 2007-05-12 15:10 ` Peter Stephenson
2007-05-12 16:31 ` Meta-tags Andrey Borzenkov
2007-05-12 16:30 ` Meta-tags Bart Schaefer
1 sibling, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2007-05-12 15:10 UTC (permalink / raw)
To: zsh-users
Andrey Borzenkov wrote:
> Arguably zsh should treat \M-x and ESC-x interchangeably; I believe it even
> was the case once but my memory fails me here.
I don't think they were ever explicitly tied together, although "bindkey
-m" sets up the default bindings for Meta as well as escape.
The problem nowadays is that the meta sequences clash with directly
entered multibyte characters (see recent postings, passim). This
is not only the case with special keyboards; recent Xorg distributions
allow you to create accented characters with AltGr. On my keyboard
AltGr [ a gaves a with diaeresis/Umlaut, for example. This will appear
as to the shell as a multibyte key sequence with the top bit set, just
like a \M- key sequence. Due to the potential problems, bindkey -m will
now print a warning.
That reminds me, too...anyone having problems with entering multibyte
characters directly should check bindkey -m isn't in effect.
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Meta-tags
2007-05-12 10:32 ` Meta-tags Andrey Borzenkov
2007-05-12 15:10 ` Meta-tags Peter Stephenson
@ 2007-05-12 16:30 ` Bart Schaefer
2007-05-12 16:34 ` Meta-tags Andrey Borzenkov
1 sibling, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2007-05-12 16:30 UTC (permalink / raw)
To: zsh-users
On May 12, 2:32pm, Andrey Borzenkov wrote:
}
} Arguably zsh should treat \M-x and ESC-x interchangeably; I believe it
} even was the case once but my memory fails me here.
It's never interchanged them, but the "bindkey -m" command initializes
all the \M- sequences to be the same as the ESC- sequences. Nowadays
that also turns off multibyte support, so it's not as desirable.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Meta-tags
2007-05-12 15:10 ` Meta-tags Peter Stephenson
@ 2007-05-12 16:31 ` Andrey Borzenkov
0 siblings, 0 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2007-05-12 16:31 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
On Saturday 12 May 2007, Peter Stephenson wrote:
> Andrey Borzenkov wrote:
> > Arguably zsh should treat \M-x and ESC-x interchangeably; I believe it
> > even was the case once but my memory fails me here.
>
> I don't think they were ever explicitly tied together, although "bindkey
> -m" sets up the default bindings for Meta as well as escape.
>
Ah, that probably is what I had in mind.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Meta-tags
2007-05-12 16:30 ` Meta-tags Bart Schaefer
@ 2007-05-12 16:34 ` Andrey Borzenkov
0 siblings, 0 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2007-05-12 16:34 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 533 bytes --]
On Saturday 12 May 2007, Bart Schaefer wrote:
> On May 12, 2:32pm, Andrey Borzenkov wrote:
> }
> } Arguably zsh should treat \M-x and ESC-x interchangeably; I believe it
> } even was the case once but my memory fails me here.
>
> It's never interchanged them, but the "bindkey -m" command initializes
> all the \M- sequences to be the same as the ESC- sequences. Nowadays
> that also turns off multibyte support, so it's not as desirable.
>
zsh also adds those ESC mappings to default emacs keymap automatically BTW.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-12 16:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-12 10:00 Meta-tags Wingot
2007-05-12 10:32 ` Meta-tags Andrey Borzenkov
2007-05-12 15:10 ` Meta-tags Peter Stephenson
2007-05-12 16:31 ` Meta-tags Andrey Borzenkov
2007-05-12 16:30 ` Meta-tags Bart Schaefer
2007-05-12 16:34 ` Meta-tags Andrey Borzenkov
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).