>>Subject: vi in 4.1
>>
>>
>>Using vi in 4.0.3 and having a terminal type of vt100,
>>when a user was in the insert mode and hit an arrow key, it would
>>take him out of insert mode on the first hit and move the curser on
>>the next hits.
>>
>>Under 4.1 when you hit an arrow key while in insert mode it inserts
>>the code for the arrow key.
>>
>>This change must be due to the fact that vi uses terminfo for its terminal
>>discription instead of termcap.
>>
--------------
Most pepole responded with a suggestion of putting maps in your .exrc
file to map the arrow keys. This is fine if you want to move while in
insert mode. The following are the maps suggested.
Sounds like you are missing your .exrc file
The following maps make cursor keys move around in insert mode !
map hx
map OD i
map OB ja
map OA ka
map OC lli
What our users wanted is to hit the arrow key to take them out of
insert mode and then move the curser. I got the code from and old termcap file
that I made into a terminfo file. Below is the termcap file that
can be converted to a terminfo.
vt100-ky|vt100 w/no shifted keypad:\
:ks@:ke@:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\ <--- added this
:do=^J:co#80:li#24:cl=50\E[;H\E[2J:sf=5\ED:\
:le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\
:ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\
:md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:\
:rf=/usr/share/lib/tabset/vt100:\
:rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\
:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
:ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3:xn:\
:sc=\E7:rc=\E8:cs=\E[%i%d;%dr:
Just added the second line to the vt100-am and made a terminfo file.
FOR WHAT ITS WORTH
Robert
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:05:59 CDT