From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6338 invoked from network); 3 Apr 2003 14:49:59 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 3 Apr 2003 14:49:58 -0000 Received: (qmail 1024 invoked by alias); 3 Apr 2003 14:49:33 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6006 Received: (qmail 1016 invoked from network); 3 Apr 2003 14:49:32 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 3 Apr 2003 14:49:32 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [195.167.170.152] by sunsite.dk (MessageWall 1.0.8) with SMTP; 3 Apr 2003 14:49:32 -0000 Received: from zefram by bowl.fysh.org with local (Exim 3.35 #1 (Debian)) id 19161z-0003uS-00; Thu, 03 Apr 2003 15:49:31 +0100 Date: Thu, 3 Apr 2003 15:49:31 +0100 To: Peter Stephenson Cc: zsh-users@sunsite.dk Subject: Re: is there way to use vicmd (not viins) layout initially? Message-ID: <20030403144931.GB27548@fysh.org> References: <20030403120059.GA5325@r3_kuznecov.lan.blok-caf.ru> <4898.1049376042@csr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4898.1049376042@csr.com> User-Agent: Mutt/1.3.28i From: Zefram Peter Stephenson wrote: >Unfortunately, if you do that, although the shell starts in vicmd mode, >you can't get into viins mode, because the code which implements >`vi-insert' switches to the main keymap, i.e. in this case straight back >to vicmd. This is actually documented, but I'm not sure if it's >necessary. I believe the intent was that in Emacs mode one could switch to vi command mode and then switch back to Emacs mode by invoking an insert command from the vicmd keymap. That is, one can have vi-style modal editing with the insert mode keymap actually being Emacs mode. Changing the vi insert commands to switch to the "viins" keymap would make this impossible in the current keymap arrangement. It would still be possible to get a similar effect by making "viins" an alias for the "emacs" keymap, but this is an extra setup step and comes at the expense of the real vi insert mode keymap. I suggest that to achieve starting editing in vi command mode what one wants to do is select the "vicmd" keymap instead of "main" when the editor is invoked. Perhaps there could be a specially-named widget that, if it exists, gets invoked as soon as ZLE has started up to start editing a new command line; this would be the in-ZLE equivalent of the precmd function. -zefram