h,j,k,l in vi
mwm at ucbtopaz.CC.Berkeley.ARPA
mwm at ucbtopaz.CC.Berkeley.ARPA
Tue Feb 19 14:04:26 AEST 1985
In article <2172 at usceast.UUCP> ted at 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.
<mike
More information about the Comp.unix
mailing list