Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Keybindings for prev- and next-char

DervishD sent me the following 0.7K:

> > I am using the viins keymap, but my escape key doesn't appear to bringing me
> > into vi-cmd-mode.  In fact,
> > 
> >    bindkey "^[" beep
> > 
> > doesn't even seem to register the key to the beep.  I'm using zsh 4.0.4 on
> > Mac OS 10.2.  Any ideas?
>     Could you please post the output of bindkey for the viins and
> vicmd keymaps? I think that you may be having problems with the
> selected keymap.
>     Here your bindkey above works perfectly. If you don't hear a
> beep, look if 'no_beep' option is set.

I made sure to setopt beep because I have no_beep in my .zshrc file.
However, after making some changes I sourced .zshrc and reverted back!
Sorry.  I realized this problem last night, after I had shut my machine down
and was lying safely in bed.

Upon returning to it, I found that ^[ was not bound to anything.  So,

   bindkey "^[" vi-cmd-mode

was all I needed.  Initially I had

   bindkey -M viins "^[" vi-cmd-mode

but upon closer inspection it appears that viins isn't really my keymap.
I've been using emacs without realizing it.  :(  However, EDITOR and VISUAL
are both set to vi -- in my .zshrc file.  Does it matter where these are
set?  The main page checks these "when the shell starts up."

Chris Johnson

Messages sorted by: Reverse Date, Date, Thread, Author