h,j,k,l in vi

Rob Warnock rpw3 at redwood.UUCP
Wed Feb 27 23:03:38 AEST 1985


+---------------
| The real reason for the h,j,k,l mappings in vi is that Berkeley had
| nothing but ADM-3a in the early days. If you look on it keyboard, those
| keys are the equivalent of the cursor control characters...
| Daniel Conde | conde.pa at Xerox.ARPA
+---------------

In all of this dialog about h,j,k,l lately, I have seen no one note the
following (sorry if this is a repeat):

H/J/K/L are "reasonable" for left/down/up/right for the simple fact that

	<cntl>-H == backspace == move left
	<cntl>-J == line feed == move down
	<cntl>-K == vert. tab == move up (on many terminals)
	<cntl>-L == form feed == clear screen [Oh well, can't win 'em all! ;-} ]

That these keys also are (1) on the home row and (2) form a "linearized"
or "flattened" version of the "diamond" cursor-key pattern is an additional
convenience. Note that several game programs which use h,j,k,l for cursor
motions also allow a,s,d,f for left-handed folk.


Rob Warnock
Systems Architecture Consultant

UUCP:	{ihnp4,ucbvax!dual}!fortune!redwood!rpw3
DDD:	(415)572-2607
USPS:	510 Trinidad Lane, Foster City, CA  94404



More information about the Comp.unix mailing list