From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Filipe Silva <filipe.silva@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: [vi-mode] mapping <esc> (`\e') in visual mode in zsl vi-mode
Date: Tue, 21 Jun 2016 19:26:40 +0200 [thread overview]
Message-ID: <21131.1466530000@thecus.kiddle.eu> (raw)
In-Reply-To: <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
next prev parent reply other threads:[~2016-06-21 17:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 17:09 Filipe Silva
2016-06-21 17:26 ` Oliver Kiddle [this message]
2016-06-21 17:35 ` Filipe Silva
2016-06-21 17:35 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=21131.1466530000@thecus.kiddle.eu \
--to=okiddle@yahoo.co.uk \
--cc=filipe.silva@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).