'Vi' cursor movement

Don Dillon dondd at hpmwtd.HP.COM
Sat Feb 10 08:40:16 AEST 1990


	Thanks to everybody that  repsonded via email,  everyone came up
with the same answer, which is shown below.  Unfortunately,  it can't be
entered  into a file,(or  at least I haven't  been able to with Vi.  The
'^J' can't be heald in the file because  it always performs  a line feed
when  typed,  even  when  preceeded  with a '^V'.  Is  there  any way of
putting a cnt-j into a file without it being interpreted as a line feed?

#
#	map the cntl-h key to move cursor left while in insert mode
#
map!	^H	^[i
#
#	map the cntl-j key to move cursor down while in insert mode
#
map!	^J	^[ja
#
#	map the cntl-k key to move cursor up while in insert mode
#
map!	^K	^[ka
#
#	map the cntl-l key to move cursor right while in insert mode
#
map!	^L	^[i
#
#
Don Dillon

INTERNET : dondd at hpmwetg
HPDESK   : Don Dillon /HP5700/UX
TELNET   : 577-2869



More information about the Comp.unix.questions mailing list