[comp.editors] vi's "too dangerous to map that"

cameron@spinifex.eecs.unsw.oz (Cameron Simpson) (11/27/89)

In article <1989Nov21.101249.15226@cs.eur.nl>, henk@cs.eur.nl (Henk Langeveld) writes:
> Andrej Brodnik (Andy) writes:
> >It is very interesting to read all of this staff about vi :: EDT. But let us
> >do something reasonable. Let us try to enforce vi to behave as EDT on UNIX and
> >EDT to be as vi on VMS. Can we?
> Nice idea, good luck!
> >PS: By the way let us assume to have some DEC compatible (if you would like
> >ANSI) terminal with a keypad as VT1xx has it.

I tried to do this for a friend of mine a couple of years ago. That is, rig
the keypad to act a bit like it does in EDT with `gold keys' (I think), and
effectively be in insert mode all the time, etc. Much mapping of the tail
ends of the escape sequences returned by the keys, etc. It partly worked,
but eventually I ran up against vi's "too dangerous to map that" message.
I can't find any doco about exactly what causes it, though it seems to be
maps which cross insert/command mode boundaries. I'd love to know exactly
what causes it. Then I'd have a better idea of how to work around it.
	- Cameron Simpson
-- 
ACSnet,CSNET:	cameron@eecs.unsw.oz	JANET: eecs.unsw.oz!cameron@ukc
UUCP:		...!uunet!munnari!eecs.unsw.oz!cameron
BITNET/ARPA:	cameron@eecs.unsw.oz.au

jerry@altos86.Altos.COM (Jerry Gardner) (11/29/89)

In article <511@spinifex.eecs.unsw.oz> cameron@spinifex.eecs.unsw.oz (Cameron Simpson) writes:
 
>I tried to do this for a friend of mine a couple of years ago. That is, rig
>the keypad to act a bit like it does in EDT with `gold keys' (I think), and
>effectively be in insert mode all the time, etc. Much mapping of the tail
>ends of the escape sequences returned by the keys, etc. It partly worked,
>but eventually I ran up against vi's "too dangerous to map that" message.
>I can't find any doco about exactly what causes it, though it seems to be
>maps which cross insert/command mode boundaries. I'd love to know exactly
>what causes it. Then I'd have a better idea of how to work around it.
>	- Cameron Simpson


Here's the comment right before the code that prints the "too dangerous to
map that" message.


		/*
		 * We don't let the user rob himself of ":", and making
		 * multi char words is a bad idea so we don't allow it.
		 * Note that if user sets mapinput and maps all of return,
		 * linefeed, and escape, he can hurt himself. This is
		 * so weird I don't bother to check for it.
		 */


Interesting, eh?


-- 
Jerry Gardner, NJ6A					Altos Computer Systems
UUCP: {sun|pyramid|sco|amdahl|uunet}!altos86!jerry	2641 Orchard Parkway
Internet: jerry@altos.com				San Jose, CA  95134
I don't speak for Altos, they don't speak for me.       946-6700