zsh-workers
 help / color / mirror / code / Atom feed
* vi mode and ^A
@ 1996-07-20 16:38 Bill Pemberton
  1996-07-20 17:42 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Bill Pemberton @ 1996-07-20 16:38 UTC (permalink / raw)
  To: zsh-workers

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

-or-

bindkey '^A' vi-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).

-- 
Bill Pemberton                           wfp5p@virginia.edu
ITC/Unix Systems                         flash@virginia.edu
University of Virginia                   uunet!virginia!wfp5p



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

* Re: vi mode and ^A
  1996-07-20 16:38 vi mode and ^A Bill Pemberton
@ 1996-07-20 17:42 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1996-07-20 17:42 UTC (permalink / raw)
  To: Bill Pemberton, zsh-workers

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"



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

end of thread, other threads:[~1996-07-20 17:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-20 16:38 vi mode and ^A Bill Pemberton
1996-07-20 17:42 ` Bart Schaefer

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