zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@dcs.warwick.ac.uk>
To: schaefer@brasslantern.com
Cc: zsh-workers@math.gatech.edu
Subject: Re: Vi insert-mode cursor key bindings.
Date: Tue, 26 Nov 1996 18:09:00 +0000 (GMT)	[thread overview]
Message-ID: <11256.199611261809@stone.dcs.warwick.ac.uk> (raw)
In-Reply-To: <961126093403.ZM5050655@srf-59.nbn.com> from "Bart Schaefer" at Nov 26, 96 09:33:01 am

>That's only bad if striking another key while zsh is waiting causes the
>wrong thing to happen.
>
>For example, if ESC is a prefix but ESC k is not bound to anything, and
>I rapidly type ESC k, does zsh drop into vi-cmd-mode and move up a line?
>Or does it feep because it has interpreted ESC k as a sequence?

It does the right thing in that case.  But <ESC>[A is a likely
mistyping of some reasonable editing actions.  In any case, I find the
delay annoying: if I pressed <ESC>, it should take the action for <ESC>
immediately.  With no escape sequences around, this is acheivable.

>> One better: I don't use cursor keys at all.  Their behaviour is too
>> inconsistent to rely on them.  (The terminals that I regularly use
>> don't generate ANSI escape sequences, so they wouldn't work in ZLE.)
>
>But they do generate some kind of escape sequence, right?

No.  Actually, I usually use a couple of Lear Siegler ADM 3E
terminals.  These generate ^H for left, ^J for down, ^K for up[1] and
^L for right.  Some programs can handle this (vi for one), but many get
confused.

>If we're going to add default bindings for the cursor keys, we should
>do it right -- we should read the term{cap,info} database and add the
>binding for what it says the arrow keys generate, not just hardwire to
>the vt100/ANSI sequences.  (Most vi that I've used actually map both
>the ANSI and terminfo arrow keys, though not in insert mode.)

Yes, we should.  But we should watch out for weird terminals like mine,
and be careful not to squash anything otherwise bound.  Personally I
would miss using right arrow to clear the screen, if it were to be
rebound.

-zefram

[1] We keep getting inexperienced first year undergrads trying to edit
their Pascal assignments in Jove on these terminals, and deleting half
their program while trying to navigate.  I love these terminals.  (-:


  reply	other threads:[~1996-11-26 18:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-26 12:43 Duncan Sinclair
1996-11-26 12:53 ` Zefram
     [not found]   ` <zefram@dcs.warwick.ac.uk>
1996-11-26 17:33     ` Bart Schaefer
1996-11-26 18:09       ` Zefram [this message]
1996-11-27  0:40         ` Bart Schaefer
1996-11-27 18:21 Duncan Sinclair

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=11256.199611261809@stone.dcs.warwick.ac.uk \
    --to=zefram@dcs.warwick.ac.uk \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@math.gatech.edu \
    /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).