Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site qubix.UUCP
Path: utzoo!linus!genrad!mit-eddi!mit-vax!eagle!harpo!seismo!hao!hplabs!hpda!fortune!megatest!sun!decwrl!qubix!lab
From: lab@qubix.UUCP
Newsgroups: net.bugs.4bsd,net.unix-wizards
Subject: Bug_in_vi_map_funtion
Message-ID: <301@qubix.UUCP>
Date: Mon, 6-Jun-83 20:30:51 EDT
Article-I.D.: qubix.301
Posted: Mon Jun  6 20:30:51 1983
Date-Received: Thu, 9-Jun-83 04:49:39 EDT
Organization: Qubix Graphic Systems, Saratoga, CA
Lines: 20

I have found a VERY annoying bug in the map! capability of vi.
Background:
	map! ^[ ^[l
	map! ^[I ^D
The former causes the cursor to stay in the same place when ESC
has been pressed (rather than backing up one to the left). The
latter is my BackTab key, which I am using in input mode to
backtab over autoindent.

Bug: when I press BackTab, vi sees the ^[ and maps it, without
seeing if any other keystrokes arrive within 1 second (p. 16 of vi
documentation). This gives me ^[lI, effectively moving the cursor
all the way left, rather than one tab position, and leaving me in
input mode (with a beep from l (move right) at the end of a line).

If I unmap ^[, there is no problem with ^[I. If I map a starting
substring of any of my other function keys in command mode, there
is no problem.
					Larry Bickford
					decvax!decwrl!qubix!lab