chris@umcp-cs.UUCP (02/06/84)
Vi (at least the one that comes with 4.1BSD) looks at k0 through k9. If you ":map #1 frobozz", then "k0" produces "frobozz". [By the way, this has reminded me of a fun experiment. What will happen if you enter Vi and type ":ab foo foo", then type "ifoo "? Think about it, then try it. The most interesting part is what happens after you hit DEL.] Terminfo has basically the same set of "k" keys as termcap. (I think... don't have my cheat sheet handy. PS thanks Mark) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris.umcp-cs@CSNet-Relay
richard@sequent.UUCP (02/08/84)
What happens when you type ":ab foo foo" then "ifoo"? Our version of vi responds with "No tail recursion" to the first part. Why, what do you think happens? from the confused and bleeding fingertips of ...!sequent!richard
kav@ih1ap.UUCP (Kurt Vangsness) (02/10/84)
:ab foo foo doesn't cause the bug. Here is a re-posting of an article that described the bug: ---------- From ihnp4!houxm!mhuxa!mhuxi!mhuxt!eagle!harpo!seismo!rlgvax!cvl!umcp-cs!chris Wed Dec 31 18:00:00 1969 Relay-Version: version B 2.10 5/16/83; site ih1ap.UUCP Path: ih1ap!ihnp4!houxm!mhuxa!mhuxi!mhuxt!eagle!harpo!seismo!rlgvax!cvl!umcp-cs!chris From: chris@umcp-cs.UUCP Newsgroups: net.bugs.4bsd,net.unix-wizards Subject: Re: Bug_in_vi_map_funtion Message-ID: <132@umcp-cs.UUCP> Date: Thu, 9-Jun-83 07:17:30 CDT Article-I.D.: umcp-cs.132 Posted: Thu Jun 9 07:17:30 1983 Date-Received: Thu, 9-Jun-83 16:19:27 CDT References: qubix.301 Lines: 15 Speaking of VI map bugs, here's a cute bug that's very similar. Type :ab bar bar-bell then (in insert mode) type 'bar'. Wheee! Lots of fun, if you like watching the cursor move. Now hit DEL. Gosh! Where did all those 'bell's come from? (The latter doesn't always happen, and when it does you usually get some strange control character too). I ran into this bug once when I tried to abbreviate someone's first name to his full name, or some such. Vi should notice that it's expanding the abbreviation and refuse to expand it again, so that it won't endless loop. It would even be acceptable to stop expanding ALL abbreviations, as long as it stops expanding the initial one. ---------- Kurt Vangsness AT&T Bell Laboratories - Naperville, Ill ihnp4!ih1ap!kav