Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 1996 06:34:00 -0500
From:      peter@taronga.com (Peter da Silva)
To:        andrsn@andrsn.stanford.edu, doc@freebsd.org
Subject:   Re: vi tutorial
Message-ID:  <199609051134.GAA09245@bonkers.taronga.com>
In-Reply-To: <Pine.BSI.3.94.960818121114.1705A-100000@andrsn.stanford.edu>
References:  <199608180723.AAA12015@athena.tera.com>

index | next in thread | previous in thread | raw e-mail

In article <Pine.BSI.3.94.960818121114.1705A-100000@andrsn.stanford.edu>,
Annelise Anderson  <andrsn@andrsn.stanford.edu> 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!



help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609051134.GAA09245>