Live data from Hacker News

Here is why vim uses the hjkl keys as arrow keys

catonmat.net

1–10 of 100 posts

Re: Here is why vim uses the hjkl keys as arrow keys

#2
Oh lord! I remember these unibody terminals. I had to use the Volker-Craig VC4404 . That thing was built like a tank. You had to hammer at the keys with great force. Soon one got into the habit of hammering on the keys all the time.

And then one day I walked into the lab with shiny new VT-100 terminals with their soft keys; but started hammering on them by habit. And everybody turned around and looked at me as if I was possessed..... :-D

Re: Here is why vim uses the hjkl keys as arrow keys

#4
I worry that the tone of the article seems dismissive of the choice that went into mapping those keys to arrow directions in vi ("That's the whole story"). As if to say it was mere happenstance that vi uses hjkl, and any other outcome was equally likely.

It seems more the case that the designers of that computer chose those particular keys on the basis of a desire for efficiency that vi also followed, so there was no need to create a new convention.

Re: Here is why vim uses the hjkl keys as arrow keys

#5
The ADM-3A was a dumb terminal (well, it had to have had some level of screen addressibility, but was definitely not ANSI-compatible), not a computer. They were sold as kits, and about 1/3 the price of a VT-100. I remember reading somewhere that they were the first glass teletypes available to the BSD folks, and Bill Joy wrote vi purely because it allowed him to monopolize one for his own use.

Re: Here is why vim uses the hjkl keys as arrow keys

#8
ADM3a was a terminal, not a computer. I used to use these two in around 1976 or so. And the hjkl pattern has nothing to do with this or any other terminal. The ASCII control codes for Ctrl-H, Ctrl-J, Ctrl-K and Ctrl-L were used to make the Teletype's printing carriage move left, down, up or right. Bill Joy's innovation was "modes" so that Ctrl-H did not delete the character when it moved left, etc...

Re: Here is why vim uses the hjkl keys as arrow keys

#9
post #7

It would have been a lot more useful if the link had said how/why the ADM-3A used hjkl as cursor keys.

For those reading this that don't know, it's so your hands stay on the "home row"

[Edit:] or at least that's what I thought, wavetossed's comment below provides interesting insight.

Re: Here is why vim uses the hjkl keys as arrow keys

#10
post #4

I worry that the tone of the article seems dismissive of the choice that went into mapping those keys to arrow directions in vi ("That's the whole story"). As if to say it was mere happenstance that vi uses hjkl, and any other outcome was equally likely. It seems more the case that the designers of that computer chose those particular keys on the basis of a desire for efficiency that vi also followed, so there was no…

The "article" is barely three full sentence and includes two images. To me it clearly states why hjkl were chosen as the keys for navigating around the editor.

How does the author's "That's the whole story!" ending make you feel like he's saying hjkl being used as the navigation keys was a coincidence?

Post reply on HN