zsh-users
 help / color / mirror / code / Atom feed
* ALT/meta problems
@ 2006-08-17 15:54 Meino Christian Cramer
  2006-08-17 16:09 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Meino Christian Cramer @ 2006-08-17 15:54 UTC (permalink / raw)
  To: zsh-users


Hi,

 I am using vim (console version, _not_ gvim) and mrxvt and of course
 zsh, newest stable version on a recent gentoo system.

 My problems are keycombinations like ALT-<key>.

 Either I start mrxvt as mrxvt and all ALT-<key> are mappes to
 <ESC>-<key>.

 When using keymappings in vim, which map a keytrstroke to nearly
 anthing you want, all mappings using M-<key> are ignored therefore.
 vim expsects ALT-<key>s to be in the range of 225-250 and not
 keycombos made from <ESC>-<key>. This is also Bram Molenaars, the
 author of vim, opinion of how it should be.

 Or I start mrxvt as 'mrxvt -m8' instructing mrxvt to generate single
 byte keyvalue for the meta-keys as exspected by vim. Then keymappings
 in vim of the kind described above do work...but I will loose (for
 example) the very handy feature of zsh: pressing ALT-. to get the last
 argument of the previous command. Zsh exspects <ESC>-<keys> sequences
 for the Meta-keys.

 Is there any way out of this disaster ?

 Kind regards,
 mcc


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

* Re: ALT/meta problems
  2006-08-17 15:54 ALT/meta problems Meino Christian Cramer
@ 2006-08-17 16:09 ` Peter Stephenson
  2006-08-17 16:45   ` Meino Christian Cramer
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2006-08-17 16:09 UTC (permalink / raw)
  To: zsh-users

Meino Christian Cramer <Meino.Cramer@gmx.de> wrote:
>  Or I start mrxvt as 'mrxvt -m8' instructing mrxvt to generate single
>  byte keyvalue for the meta-keys as exspected by vim. Then keymappings
>  in vim of the kind described above do work...but I will loose (for
>  example) the very handy feature of zsh: pressing ALT-. to get the last
>  argument of the previous command. Zsh exspects <ESC>-<keys> sequences
>  for the Meta-keys.

"bindkey -m" binds the default keys in the other way.  Note it doesn't have
a future effect, i.e. anything you define yourself must be defined with
bindkey "\M-..." if you want that effect.  Unlike Emacs they're not tied
together, so you need to do bindkey "\e..." as well if you want the
escape version to work.  (Hence you don't *need* "bindkey -m" to use
the Meta key if you only want to bind specific sequences of your own.)

With 4.3.2 use "bindkey -m 2>/dev/null"; bindkey -m gives a warning when
multibyte mode is enabled since it will mess up multibyte input.  However,
if you don't care you can suppress the warning.

There's a supposedly de-obfuscatory sidebar called "THE META KEY" in "From
Bash to Z Shell" on page 78.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


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

* Re: ALT/meta problems
  2006-08-17 16:09 ` Peter Stephenson
@ 2006-08-17 16:45   ` Meino Christian Cramer
  0 siblings, 0 replies; 3+ messages in thread
From: Meino Christian Cramer @ 2006-08-17 16:45 UTC (permalink / raw)
  To: pws; +Cc: zsh-users

From: Peter Stephenson <pws@csr.com>
Subject: Re: ALT/meta problems
Date: Thu, 17 Aug 2006 17:09:58 +0100

Hi Peter !

> Meino Christian Cramer <Meino.Cramer@gmx.de> wrote:
> >  Or I start mrxvt as 'mrxvt -m8' instructing mrxvt to generate single
> >  byte keyvalue for the meta-keys as exspected by vim. Then keymappings
> >  in vim of the kind described above do work...but I will loose (for
> >  example) the very handy feature of zsh: pressing ALT-. to get the last
> >  argument of the previous command. Zsh exspects <ESC>-<keys> sequences
> >  for the Meta-keys.
> 
> "bindkey -m" binds the default keys in the other way.  Note it doesn't have
> a future effect, i.e. anything you define yourself must be defined with
> bindkey "\M-..." if you want that effect.  Unlike Emacs they're not tied
> together, so you need to do bindkey "\e..." as well if you want the
> escape version to work.  (Hence you don't *need* "bindkey -m" to use
> the Meta key if you only want to bind specific sequences of your own.)
> 
> With 4.3.2 use "bindkey -m 2>/dev/null"; bindkey -m gives a warning when
> multibyte mode is enabled since it will mess up multibyte input.  However,
> if you don't care you can suppress the warning.
> 
> There's a supposedly de-obfuscatory sidebar called "THE META KEY" in "From
> Bash to Z Shell" on page 78.
> 
> -- 
> Peter Stephenson <pws@csr.com>                  Software Engineer
> CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
> Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070
> 
> 
> To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php
> 


Thanks a lot for your help ! It works and vim and zsh are friends
again. :)

Have a nice evening!
mcc


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

end of thread, other threads:[~2006-08-17 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-17 15:54 ALT/meta problems Meino Christian Cramer
2006-08-17 16:09 ` Peter Stephenson
2006-08-17 16:45   ` Meino Christian Cramer

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