From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25817 invoked from network); 24 Jun 1999 15:31:23 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Jun 1999 15:31:23 -0000 Received: (qmail 23285 invoked by alias); 24 Jun 1999 15:31:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6829 Received: (qmail 23231 invoked from network); 24 Jun 1999 15:30:16 -0000 From: "Bart Schaefer" Message-Id: <990624152958.ZM1704@candle.brasslantern.com> Date: Thu, 24 Jun 1999 15:29:58 +0000 In-Reply-To: <199906230953.LAA06757@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "RE: PATCH: local keymaps" (Jun 23, 11:53am) References: <199906230953.LAA06757@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: local keymaps MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii } Andrej Borsenkow wrote: } } > Unforunately, after } > } > bindkey -A vicmd main } > } > no more input is possible. I would expect, that at least `a' would } > bring me back to viins. In vi mode, the main keymap is viins and vicmd is the alternate keymap. ESC in viins switches to the alternate keymap, and `a' in vicmd switches to the main keymap. So if you make vicmd the main keymap, you can never make it go away, because it just switches to itself. I don't know whether it'd be possible to make `a' in vicmd always switch to viins even when that isn't the usual main keymap. Now that we have this local keymap stuff, it might be easier. I'm not sure whether there are any restrictions on what goes into the alternate keymap. For example, you could make viins the main keymap and emacs the alternate keymap, so that hitting ESC takes you into emacs bindings -- but then I'm not sure whether something in the emacs keymap might assume that it's the main keymap and/or accidentally pop you back into the main keymap. On Jun 23, 11:53am, Sven Wischnowsky wrote: } Subject: RE: PATCH: local keymaps } } > May be, it's time to allow for binding of generic keys instead of just } > escape sequences. E.g. in vim (or elvis) you can map charaters Right, } > Left, Home, F1 etc. Let's be more user friendly :-) } } Yes, I was wishing we had this when adding the keymap to complist (we } would need an option for this to bindkey, though, because `bindkey Up' } currently binds the two-character sequence `U' `p'). You just need a special syntax for the named keys. Z-Mail Lite has vaguely emacs-like key-rebinding capabilities and keymaps, and uses the sequence \ to refer to named keys, e.g. \, \, \, etc. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com