Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Weird Vi-mode behavior
- X-seq: zsh-workers 25998
- From: Peter Stephenson <pws@xxxxxxx>
- To: Matthieu Louvel de Monceaux <glory69@xxxxxxxxx>
- Subject: Re: Weird Vi-mode behavior
- Date: Mon, 03 Nov 2008 17:39:37 +0000
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <490F3638.4000706@xxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <490EED78.8010802@xxxxxxxxx> <200811031237.mA3Cb2VS013961@xxxxxxxxxxxxxx> <20081103125609.GA4855@xxxxxxxxxxxxxxx> <490F3638.4000706@xxxxxxxxx>
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