From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id FAA13698 for ; Wed, 27 Nov 1996 05:14:05 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id NAA21121; Tue, 26 Nov 1996 13:08:44 -0500 (EST) Resent-Date: Tue, 26 Nov 1996 13:08:44 -0500 (EST) From: Zefram Message-Id: <11256.199611261809@stone.dcs.warwick.ac.uk> Subject: Re: Vi insert-mode cursor key bindings. To: schaefer@brasslantern.com Date: Tue, 26 Nov 1996 18:09:00 +0000 (GMT) Cc: zsh-workers@math.gatech.edu In-Reply-To: <961126093403.ZM5050655@srf-59.nbn.com> from "Bart Schaefer" at Nov 26, 96 09:33:01 am X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]8483.78 X-US-Congress: Moronic fuckers Content-Type: text Resent-Message-ID: <"EotXZ2.0.u95.h8pco"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2488 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >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 [A is a likely mistyping of some reasonable editing actions. In any case, I find the delay annoying: if I pressed , it should take the action for 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. (-: