From owner-freebsd-doc Thu Sep 5 07:00:27 1996 Return-Path: owner-doc Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA18828 for doc-outgoing; Thu, 5 Sep 1996 07:00:27 -0700 (PDT) Received: from mailbox.neosoft.com (mailbox.neosoft.com [206.109.1.16]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id HAA18818 for ; Thu, 5 Sep 1996 07:00:23 -0700 (PDT) Received: from bonkers.taronga.com (root@bonkers.neosoft.com [206.109.2.48]) by mailbox.neosoft.com (8.7.5/8.7.3) with SMTP id JAA04528; Thu, 5 Sep 1996 09:00:16 -0500 (CDT) Received: (from peter@localhost) by bonkers.taronga.com (8.6.11/8.6.9) id GAA09245; Thu, 5 Sep 1996 06:34:00 -0500 Date: Thu, 5 Sep 1996 06:34:00 -0500 From: peter@taronga.com (Peter da Silva) Message-Id: <199609051134.GAA09245@bonkers.taronga.com> To: andrsn@andrsn.stanford.edu, doc@freebsd.org Subject: Re: vi tutorial Newsgroups: taronga.freebsd.doc In-Reply-To: References: <199608180723.AAA12015@athena.tera.com> Organization: none Sender: owner-doc@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In article , Annelise Anderson wrote: >The arrow keys have always worked for me with FreeBSD (2.0.5 and >later). I think I'm using them in the circumstances where they >supposedly mess everything up. On the other hand if I telnet to a >computer at Stanford running Sun OS 4.1.4, and the arrow keys produce >capital letters. I believe this to be a key-binding problem but I'm not >sure. One problem is that it's not an insert mode, and the arrow keys in insert mode hack in the original VI (and emulated in NVI) was to define a macro that terminates the insert command, does the right move, and starts a new insert command. In NVI, it actually keeps the commands together, which makes things easier for newbies but gets into odd side-effects for experts because the repeat and count features don't work right if you move during an insertion. The other problem is that the beginning of an arrow key escape sequence on most terminals is an escape character. How does VI distinguish a real ESC from an arrow key? Well, it uses timing. Guess what happens if you telnet. Right! All the timing information gets messed up!