From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: In Vi mode, show whether "insert" or "command" state is active
Date: Fri, 26 Dec 2014 12:32:12 +0100 [thread overview]
Message-ID: <27275.1419593532@thecus.kiddle.eu> (raw)
In-Reply-To: <141225151837.ZM15719@torch.brasslantern.com>
Bart wrote:
> Yes, I was only providing an example / starting point. For this to work
> better we'd need another zleentry token or the like, to be able to query
> the keymap and state without requiring getsparam() calls and without the
> extra prompt redraw from inside zle-line-init. Also keymap selection
> and possibly other state changes should always redraw the prompt (as an
> example, there currently is no hook when entering overwrite mode).
Do we really want the whole prompt redrawn? It's annoying if conditional
parts of the prompt evaluate differently causing it to change size.
With my current setup, I have a number of things setup to preserve this
state. So for example. with the return status I also need zle-line-init
to contain:
typeset -g __prompt_status="$?"
And zle-keymap-select has:
() {
return $__prompt_status
}
zle reset-prompt
Would a feature be somehow possible where a fixed set of characters are
marked for dynamic updating and made easy to update.
I'm not sure the keymap name is the most useful indicator for the vi
mode. local keymaps are not going to be indicated and keymaps like
menuselect have a longer name. Subtler indicators like cursor
shape/colour or something like the readline feature are perhaps more
useful. In vim, I would never read the '-- INSERT --' indicator: it is
a blob that appears in peripheral vision.
I should mention that I'm all for making this simpler to configure.
Oliver
next prev parent reply other threads:[~2014-12-26 11:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 0:07 Fwd: " Jason Spiro
2014-12-22 1:57 ` Bart Schaefer
2014-12-22 18:25 ` Peter Stephenson
2014-12-22 18:44 ` Ray Andrews
2014-12-22 18:44 ` ZyX
2014-12-23 4:40 ` Bart Schaefer
2014-12-25 4:15 ` Jason Spiro
2014-12-25 20:34 ` ZyX
2014-12-25 23:18 ` Bart Schaefer
2014-12-26 11:32 ` Oliver Kiddle [this message]
2014-12-26 19:21 ` Bart Schaefer
2014-12-26 21:58 ` Christian Neukirchen
2014-12-27 0:31 ` Bart Schaefer
2014-12-29 3:43 Jason Spiro
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=27275.1419593532@thecus.kiddle.eu \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@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).