'vi' is driving me crazy
Bill Campbell
linux-sxs
Mon Dec 27 18:53:44 PST 2004
On Mon, Dec 27, 2004, Roger Oberholtzer wrote:
>On Mon, 2004-12-27 at 11:27 -0800, Net Llama! wrote:
>> On 12/27/2004 07:44 AM, A. Khattri wrote:
>> > On Mon, 27 Dec 2004, Roger Oberholtzer wrote:
>> >
>> >
>> >>'vi' was written long before the 'standards'. 'vi' has a theory that
>> >>since all things you may want to do cannot be assigned to an obvious
>> >>key, then all keys are by design not related to what they do.
>> >
>> >
>> > That's not quite true - some keys ("Y" to "yank a line" and "D" to delete
>> > a line) are obviously related to the operation they perform.
>> >
>> >
>>
>> Sorry, but i've never heard anyone use the expression 'yank a line' to
>> perform the operation that hitting Y accomplishes. D is about the only
>> key that seems to have a logical correspondance with its operation, and
>> i'm convinced that was a fluke, based on all the other utterly
>> unintuitive vi operators.
>
>I wish I could find the interview with the original vi authors. That is
>where I learned about the random assignment of keys. From a
>psychological POV (and I am an experimental psychologist by training -
>human factors, to be precise) it is fine if there is no pattern to the
>key assignments. The problem starts when the pattern is inconsistent or
>incomplete. Most all the GUI handbooks are written by folk that just
>repeat what they have heard. They seldom look to the original source.
>Which, I must say, is more the US military then some IT company with a
>product. (Long day here...)
The command mode cursor keys, h, j, k, l, for left, down, up, right, were
selected because they were easy to press without moving fingers from the
home keys. When I first learned vi on a Radio Shack Model 16 running
Xenix, the arrow keys didn't work in vi, and it was years before I
discovered that they would work. I still use the letter keys for cursor
movement as I don't have to move my hands to reach the arrow keys.
Other cursor motion keys in command mode that are somewhat mnemonic:
H Top of screen (High)
M Middle of screen.
L Bottom of screen (Low).
G Bottom of Document (Go)
1G Go to top of document (cheat two keys)
Bill
--
INTERNET: bill at Celestial.COM Bill Campbell; Celestial Systems, Inc.
UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/
``The whole nation is interested that the best use shall be made of these
[new] territories. We want them for the homes of free white people''
-- Abraham Lincoln, October 16, 1854
More information about the Linux-users
mailing list