Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Vimode problem (key press dropping)
- X-seq: zsh-users 20357
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: Vimode problem (key press dropping)
- Date: Wed, 29 Jul 2015 14:35:51 +0200
- Cc: alx741@xxxxxxxxxx, Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mQ9Pcx8IxUpdRTJWk7Y513MkQq38O5GfAzdB94WDPcc=; b=NWm5tD5AyqhZZ6d0qMS+sLCVSLoEsrUdjWMpWPHxNiPuSGZQINDGaKUrxVDIxObceJ 3H691FhNONRHxDUTeIMRY2VXyDLhC84uOYNxBbUoyrfdzE2qMMsEplPnuXOJFiLtehli XzIEFc23ATfJYR3cU9f+6x0fYfrxdLMcxam9KaXiOtvmXSRJwPwCCbbLYsmYrvLXdx7X mg/RJQay8G7SKVkcv9Xlw3p5HhMbggw7aIM1a6FOjG/PMMh47OzymwvJ4Gnx1SJ4Zra7 p+Nc9SSdjWbHN9pySFp2pzNm/+GASlErc8TGWWXeSMHjakpJIjuuefJU3W2JRdy+VCj1 yBEg==
- In-reply-to: <9361.1438161965@thecus.kiddle.eu>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <5d9984411ba10dee4321a408e2763317@riseup.net> <9361.1438161965@thecus.kiddle.eu>
On Wed, Jul 29, 2015 at 11:26 AM, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> alx741@xxxxxxxxxx wrote:
>>
>> When i hit ESC two times the next letter is ignored, so in order to
>> enter insert mode i need to hit 'i'/'a' two times two. This is the same
>> for any even number of ESC, the problem is the same for 4 hits but no
>> for 3 times so i can say the second ESC hit leave the shell listening
>> and it just drop the next key press.
>
> The problem is that from vi command mode, the escape key is not bound to
> anything. If you bind escape to do absolutely nothing, the problem goes
> away.
>
> bindkey -as '\e' ''
>
> Or alternatively, the following is what vim does:
>
> bindkey -a '\e' beep
>
> Part of the reason behind the behaviour you see is that the cursor keys
> typically are bound and when you press the cursor keys, what zsh sees is
> an "escape sequence": a series of characters that start with an escape
> character. This also means that after seeing an escape character, zsh
> has to wait to see if more characters arrive. You might also want to
> tweak the KEYTIMEOUT variable to reduce this delay.
>
> Question to -workers subscribers: how should we address this in the
> defaults? I also have escape bound to set REGION_ACTIVE=0 from the
> visual keymap which should perhaps also be default behaviour (vim does
> that). Note that escape being a prefix character is what causes the
> subsequent 'i'/'a' to be ignored.
>
> Oliver
I always felt like how it should work if we get the string "abc", is
first abc is looked up and we find it isn't bound to anything, the a
gets treated as a separate input string, then we look up bc instead,
etc. What we do now is just discard the whole string as
"undefined-key".
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author