Using a vt220 clone with unix vi?

-=Runaway Daemon=- frechett at spot.Colorado.EDU
Thu Mar 7 11:20:51 AEST 1991


In article <pln.668280591 at egret1> pln at egret1.stanford.edu (Patrick L. Nolan) writes:
>I would like to know if there's a way to change termcap or tset or teach
>vi to deal with this sequence as if it was ESC.  Or maybe to make
>the terminal send ESC, without giving up the rest of the VT220
>keyboard mapping.

Why not make vi recognize the difference.  Here is an example while in vi:
Type this sequence.
:map! abc <control-V><control-[>      ^[ is <ESC>.
So you will see
:map! abc ^[ When you are done.
What happens is that any time you type abc, it will send ESC to vi.  This is an
easy thing to put in your .exrc file or just to type in.  I suspect that the
sequence that pressing the ESC key sends is odd enough that you are not going
to just stumble on it some day while typing.  

	ian

--
Ian Frechette             UNIXOPS   University of Colorado at Boulder.



More information about the Comp.unix.questions mailing list