Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: In Vi mode, show whether "insert" or "command" state is active
- X-seq: zsh-workers 34072
- From: Jason Spiro <jasonspiro4@xxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>, ZyX <kp-pav@xxxxxxxxx>, "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: In Vi mode, show whether "insert" or "command" state is active
- Date: Sun, 28 Dec 2014 22:43:29 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=n2jV9Rla77xUSB5Bn7dacp9c83bOkroNSarqm692l6c=; b=tZWsjhdu+Wyz2lma4sbt8H8Zp6hEbPEp8SydfBeJ0dQlxHx5G5JQgDXqB9y+NdwyMu aK2+MBQ6+csn1HXcXWqTumJ7YNssvRc5HEJ/F0tc24mmbED5fVx77Uu4zwJCzwOyu6hd xZMt+kMR7BAmvuoAEGmVnsjlB664xmQrel8sIwUY7BV6bQV0Tl205p9srrK2QbS4zApV hKgL/vo9K3bQzk2mezj6iPjlcald9FPbkUzJ1hv0rdjWvNcCRG1R1+wnB6Yf5OZlWeXc WCga2yUas8xHeE30+Ck0iqcLzJwwozRaVQNaYohk1HHVNA5FP4vDkcnIXfZppW8xJkpe 3vTQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
On Fri, Dec 26, 2014 at 6:32 AM, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> 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.
Hmmm.
In viins mode, you could show a bright-white '-- INSERT --' indicator
somewhere on screen. (Last line, like Vim? First line?) In vicmd
mode, you could hide the indicator. This way, you could take
advantage of users' peripheral vision to make them aware of which mode
they're in.
Or you could indicate the mode using cursor color, like Emacs Viper
does. In insert mode, turn the cursor green. In command mode, turn
the cursor back to its normal color.
Or you could do both.
ZyX wrote:
> in case of %z one should not assume only vicmd/viins: zle is not as limited as
> readline and theoretically allows any number of modes (have never seen them
> actually implemented though).
Other modes are so uncommonly used that you don't actually need to
bother identifying them. (Optimize for the common case, not for
uncommon cases.) But if you insist, you could change the '-- INSERT
--' indicator to '-- name_of_mode --' or something.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author