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



On Tue, Jun 21, 2016 at 10:09 AM, Filipe Silva <filipe.silva@xxxxxxxxx> 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.

Back in February, I wrote:
>
> As presently
> implemented, visual mode is a combination of a couple of different
> states that can each be changed independently; the determination of
> whether this "mode" is in effect is not made until the last instant
> before ZLE waits for the next keystroke, and is forgotten as soon as
> the keystroke has been consumed.  The keymap isn't even in place long
> enough for the corresponding widget to see it; it's indistinguishable
> from vicmd mode.

The consequence of this is that the only way to "end visual mode" is
(as Oliver just pointed out) to deactivate the region.



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