Zsh Mailing List Archive
Messages sorted by:
Re: visual/viopp modes are not detected by zle-keymap-select
- X-seq: zsh-users 21333
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: visual/viopp modes are not detected by zle-keymap-select
- Date: Mon, 29 Feb 2016 15:30:39 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=iThUnpJr/0WT4E4ASv/YNP5+K9sbp/Qs9NS93ccxnf4=; b=OG3H82iYy8vb3LZSTKlhz1CV4YKS20iww6YjuF4WZ00an+vRdUAcl92LhUFOCueZgx JyoDg7brHd8EWYQH0jfvTKOk+rIvWHgMh/8y5PWDOcqMPDANkOCgMPqZZ44IZRHcWe8p ShfUyZdj5F9wVy/9EH20bWU6/KrUQoG+WboC/EpV9GkTVdyfQ0BJA7uA1yHm9QqGDG+1 tBcpxLLvonKGzBIgfg2XBOGhfLQHGLr0SnUWeVPSCsTYC9d3Gdxsqc9iHb9/fa7cJNGB j2G7lBSAIaGJzcCzV9/aPg4jRKKGYzKY04uyqa/ezeCC9kFmW2gt5CJlvoTwRBMW6Qvf xMTw==
- In-reply-to: <CABZxu=zvk+18Y5OiJ7QybHuDGLNN-QSkPBRE+P6MS3GbXV1P=Q@mail.gmail.com>
- List-help: <mailto:email@example.com>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CABZxu=zvk+18Y5OiJ7QybHuDGLNN-QSkPBRE+P6MS3GbXV1P=Q@mail.gmail.com>
On Feb 24, 4:59pm, Hugh X wrote:
} Got it. Thanks for the explanation. My preliminary thought is to use
} the "visual" to update the prompt so that I can add/debug some key
} bindings in the visual mode.
OK, that's the one context where it's potentially useful, but:
} Since you mentioned that these local keymaps will have their own
} widget-binding methods through the interpreter, I wound whether there
} is such special widgets that similar to *_init and *_exit.
In fact visual mode is the one case where there is NOT any such local
interpreter -- there's just a different keymap, which is still handled
by the global interpreter. This is why it would not break anything to
invoke the zle-keymap-select hook.
However, there's also no clear begin/end of visual mode. 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.
Consequently the zle-keymap-select hook would be called twice on every
keystroke during visual "mode", if naive implementation were adopted.
Messages sorted by: