zsh-workers
 help / color / mirror / code / Atom feed
From: Jason Spiro <jasonspiro4@gmail.com>
To: zsh-workers@zsh.org
Subject: Fwd: In Vi mode, show whether "insert" or "command" state is active
Date: Wed, 17 Dec 2014 02:13:48 -0500	[thread overview]
Message-ID: <CAN2X26=YUSe95T0aMHxTCccXAE7ZeZPBN2aR=4L_tssVxxJLSQ@mail.gmail.com> (raw)

Dear list,

Here is a feature request forwarded to you from the Debian bug
tracking system.  You may also view the feature request on the Web at
<http://bugs.debian.org/772985>.

Kind regards,
~Jason Spiro

---------- Forwarded message ----------
From: Debian Bug Tracking System <http://bugs.debian.org/772985>
Date: Fri, Dec 12, 2014
Subject: Bug#772985: In Vi mode, show whether "insert" or "command"
state is active

Package: zsh
Version: 4.3.17-1
Severity: wishlist

Zsh includes a Vi emulation feature.  This feature lets you use the Vi
keys at the zsh command prompt.  Zsh's Vi emulation includes a
"command mode" and an "insert mode".

Zsh's Vi emulation does not show the user which mode is active.  This
is frustrating and confusing.  (It's like an electric oven with no
indicator to show whether the oven is on or off.)

The current state-of-the-art Vi implementation is gVim, maintained by
Bram Moolenaar.  gVim provides a few indicators to tell you which mode
you're in.  One of these indicators is the cursor.  gVim uses a
blinking block cursor in command mode, and a blinking bar in insert
mode.

It would be very good if zsh, too, would show the user which mode was
active.  You can do this any way you like.  I would like it if you did
this by setting the cursor style, just as gVim does.

Here is how to set the cursor style (in supported terminals):

Set cursor to blinking bar:  echo -en "\e[5 q"
Set cursor to blinking block:  echo -en "\e[1 q"

The above commands definitely work in recent versions of iTerm2 (for
Mac OS) and xterm.  I haven't tested them in any other terminal
emulators.  Surely some terminal emulators do nothing at all in
response to the above control sequences.  Luckily, since Debian is
open source, their users can submit patches to fix this.

P.S.  Thank you very much for helping to maintain zsh.  It's perhaps
the most featureful shell out there, and I like it.

Kind regards,
~Jason Spiro

-- 
Bug#772985: http://bugs.debian.org/772985
Debian Bug Tracking System


             reply	other threads:[~2014-12-17  7:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17  7:13 Jason Spiro [this message]
2014-12-17  7:58 ` Nathan Schwarz
2014-12-17 16:55   ` Bart Schaefer
2014-12-17 18:27     ` Oliver Kiddle
2014-12-17  8:23 ` Bart Schaefer
2014-12-22  0:07 Jason Spiro
2014-12-22  1:57 ` 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='CAN2X26=YUSe95T0aMHxTCccXAE7ZeZPBN2aR=4L_tssVxxJLSQ@mail.gmail.com' \
    --to=jasonspiro4@gmail.com \
    --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).