Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 v7 ucbtopaz-1.8; site ucbtopaz.CC.Berkeley.ARPA Path: utzoo!linus!decvax!ucbvax!ucbtopaz!mwm From: mwm@ucbtopaz.CC.Berkeley.ARPA Newsgroups: net.unix Subject: Re: h,j,k,l in vi Message-ID: <748@ucbtopaz.CC.Berkeley.ARPA> Date: Mon, 18-Feb-85 23:04:26 EST Article-I.D.: ucbtopaz.748 Posted: Mon Feb 18 23:04:26 1985 Date-Received: Wed, 20-Feb-85 20:24:09 EST References: <8242@brl-tgr.ARPA> <726@ucbtopaz.CC.Berkeley.ARPA> <2172@usceast.UUCP> Reply-To: mwm@ucbtopaz.UUCP (Praiser of Bob) Organization: Missionaria Phonibalonica Lines: 51 Summary: In article <2172@usceast.UUCP> ted@usceast.UUCP (System Programmer) writes: >Actually, h, j, k and l are at least half memonic (since ^h is backspace >and ^j is line feed), but that is not the important point. > >The point is that you never have to take your fingers off the letter keys >to move the cursor. Yup - that's a major advantage, all right. But given that, there are still "sensible" versus "nonsensical" command layouts. Sensical key layouts fall into three classes: Geometric, mnemonic and "speed-oriented." Emacs uses a true mnemonic system: ^Left, ^Right, ^Forward, and ^Back (in some cases, ^H also works). I can't recall an editor that uses a true geometric system, but it would look like: W (up) A (left) D (right) X (down) Word Star (on some terminals) uses a "speed-oriented" layout, like so: A (left), S (up), D (down), F (right). All the primary motion keys are on the home keys. The next row up (QWER) does line/page, and the lower row (ZXCV) does word/paragraph, or some such [from memory, so may be wrong]. Now vi, with hjkl, is almost a speed system. Since most other things in vi are mnemonic, I claim that this puts the vi motion commands in the set of "nonsensical" key layouts. Having used vi for two years before switching to Emacs(-like) editors, I find I prefer the true mnemonic systems. Brief experiments with geometric and arrow key systems haven't changed my opinion. However, there's been at least one study with various editing systems that places the speed ordering (for users in the same experience class) as mice/arrow keys/Emacs [If you want the reference, send mail and I'll dig it out.] While on the subject, I'll point out to people who don't know about Emacs that the motion commands are control keys because Emacs is "modeless." There is no "insert" command, as all normal graphics characters normally insert themselves into the buffer. I think that not having to do context switches to go from inserting to correcting text more than pays for having to use control keys to move the cursor. The word "modes" in the above paragraph is quoted because Emacs supports "modes" that change the meaning of some commands: Examles include "text" that makes a space character check the line length and insert a newline if you've exceeded the margin; "Automargin" that works like the vi "Autoindent"; and "Electric-C" that causes "{" and "}" to change the margins correctly for "white book" style. Enough. Try Emacs: you'll like it.