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

Re: Weird Vi-mode behavior



Matthieu Louvel de Monceaux wrote:
> Stephane Chazelas wrote:
> Thank you for your nice piece of information.
> You want me to put those bindings in my zshrc file ?
> 
> But i don't understand that :
> 
> (($+terminfo[kdch1])) &&
> 
> You said that it maps delete-char to the char sent by the delete key.
> Is it the role of the '&&' ?

That's not the important bit, which is the "bindkey" statement.
Stephane's suggestion checks if there is information about what
the "delete" key outputs, and if there is, it rebinds that.  Assuming
you're using ^h or ^? for backward delete, the two key lines are the

  bindkey -M viins '^?' backward-delete-char
  bindkey -M viins '^H' backward-delete-char

The test above those attempts to see which of the two possibilities the
"backspace" key is sending.  Typically, the two lines above will be
fine.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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