Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [vi-mode] mapping <esc> (`\e') in visual mode in zsl vi-mode
- X-seq: zsh-users 21685
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Filipe Silva <filipe.silva@xxxxxxxxx>
- Subject: Re: [vi-mode] mapping <esc> (`\e') in visual mode in zsl vi-mode
- Date: Tue, 21 Jun 2016 19:26:40 +0200
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1466530001; bh=cTh7sHhkBOwwKq2+wExhL7qOAyU78Ajs9WhZo2O7jTs=; h=cc:In-reply-to:From:References:To:Subject:Date:From:Subject; b=Euk6s2NObfWFb/quJwWGRfvPAEf9GfF8p+E18eT0CROQRIni2fzEDwrMz46QpaUS861f5mM6/YlSWIWrgIu1iJhD6d1hKCJ80WSP5W5dUlOAH6xuhpmVtNjqSf5LOq4fDCJ3TZQ2vl3VUQwX8m1oa0jCFziBdezmW29TcGKoLltzbVcHUg2ZeY7NW+1uiHDCURCh2fTy02ykQNx/xnWzM33xRiBYGTsL459iyPrkHzHgks5idQaux0blA0w/mbtVEGxI0S0hNj6Xp6Pz06obhGDHmZKDM5vSeXuPKucZtrqoubI5OLDAlwdWWdPnZrTD2NbQc5q3VBaY2ejlhZ+4Zw==
- In-reply-to: <CAEwkUWPFp2HmAmMW_3CX_Nf4=obz9YMozeom3dSyXkPr5F1eYA@mail.gmail.com>
- 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: <CAEwkUWPFp2HmAmMW_3CX_Nf4=obz9YMozeom3dSyXkPr5F1eYA@mail.gmail.com>
Filipe Silva wrote:
>
> How can I bind the <ESC> key, in zle vi-mode visual mode? I want that
> pressing <esc> in visual mode switches to vi-normal mode.
>
> this does not work:
>
> bindkey -M visual '\e' vi-cmd-mode
A deactivate-region widget was added in 5.1 so you must be using 5.0.8.
If you're stuck with 5.0.8, you can define your own:
deactivate-region() {
REGION_ACTIVE=0
}
zle -N deactivate-region
bindkey -M visual '\e' deactivate-region
Otherwise, I'd recommend upgrading.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author