From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id DAA17220 for ; Sun, 21 Jul 1996 03:45:14 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id NAA04701; Sat, 20 Jul 1996 13:41:10 -0400 (EDT) Resent-Date: Sat, 20 Jul 1996 13:41:10 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960720104215.ZM14528@candle.brasslantern.com> Date: Sat, 20 Jul 1996 10:42:15 -0700 In-Reply-To: Bill Pemberton "vi mode and ^A" (Jul 20, 12:38pm) References: <199607201638.MAA73712@tigger.itc.Virginia.EDU> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.702 02jul96) To: Bill Pemberton , zsh-workers@math.gatech.edu Subject: Re: vi mode and ^A MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"9ULoa1.0.N91.reHyn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1727 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jul 20, 12:38pm, Bill Pemberton wrote: } Subject: vi mode and ^A } } I use the vi editing mode. In 2.5, I can use ^A and ^E (for beginning of } line/end of line). However, this doesn't work in 3.0. Even if I do: } } bindkey '^A' beginning-of-line } } Actually, it does work 3.0, but in a less then desirable way. If I do the } bindkey, ^A works in insert mode only, not in command mode (it was the other } way around in 2.5). I don't know what was going on in 2.5, but (from zsh.info): Command bindings may be set using the `bindkey' builtin. There are two keymaps; the main keymap and the alternate keymap. The alternate ^^^^^^^^^^^^^ keymap is bound to vi command mode. The main keymap is bound to emacs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mode by default. To bind the main keymap to vi insert mode, use ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!!!!!!!!!!! `bindkey -v'. However, if either of the `VISUAL' or `EDITOR' environment variables contains the string `vi' when the shell starts up the main keymap will be bound to vi insert mode by default. So what you want is: bindkey -a '^A' beginning-of-line Perhaps in 2.5 after bindkey -v, bindkey without -a put the bindings into both the main and alternate keymaps? Or has the meaning of "main" and "alternate" for vi mode changed? There's nothing in the ChangeLog ... -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern New male in /home/schaefer: >N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"