News for hackers. Stuff that matters.
Re:My Favorite Vim Oneliners for Text Manipulation by tylerhou on Sunday August 06, 2023 @12:26AM (#37018972)
j goes down because it looks like a down arrow.
Re:My Favorite Vim Oneliners for Text Manipulation by jolmg on Sunday August 06, 2023 @01:35AM (#37019261)
https://en.wikipedia.org/wiki/ADM-3A#Legacy

> The use of the HJKL keys for moving the cursor in the vi editor and its descendants originated from the ADM-3A [...] The ←, ↓, ↑, → and Home labels printed on the H, J, K, L, and ~ ^ keys were a visual reference to the control characters Ctrl+H, Ctrl+J, Ctrl+K, Ctrl+L, and Ctrl+~ ^ that were required to move the cursor left, down, up, right, and to the top/left corner (or "Home" position) of the terminal, respectively [...] The Ctrl+H and Ctrl+J functions were the standard ASCII backspace and line feed respectively, but the interpretations of Ctrl+K, Ctrl+L, and Ctrl+~ ^ were new to the ADM-3A.

Seems almost a happy accident. I personally like the placement because the most common movement in a document is down and it's placed right under the most dextrous finger, the index finger, by a coincidence between ASCII encoding and QWERTY layouts. Up being the second most common movement was put under the second most dextrous finger. Nice.

Re:My Favorite Vim Oneliners for Text Manipulation by yjftsjthsd-h on Sunday August 06, 2023 @01:37AM (#37019273)
It really is funny how much vi's odd-looking key choices aren't odd at all once you see the keyboard it was developed on:)
Re:My Favorite Vim Oneliners for Text Manipulation by gjvc on Sunday August 06, 2023 @12:48PM (#37023871)
The value of being taught something by an expert.
Re:My Favorite Vim Oneliners for Text Manipulation by tylerhou on Sunday August 06, 2023 @02:25AM (#37019480)
I didn't know about the history, thanks for sharing!

(j = downarrow was a mnemonic I used while learning vim.)

Re:My Favorite Vim Oneliners for Text Manipulation by semi-extrinsic on Sunday August 06, 2023 @03:59AM (#37019873)
Here is a direct link to the ADM-3A keyboard layout:

https://en.wikipedia.org/wiki/ADM-3A#/media/File:KB_Terminal...

Re:My Favorite Vim Oneliners for Text Manipulation by woleium on Sunday August 06, 2023 @05:06PM (#37026765)
Great, now I want a "here is" key
Re:My Favorite Vim Oneliners for Text Manipulation by arcanemachiner on Sunday August 06, 2023 @02:41AM (#37019541)
I just looked down at my keyboard... The letter 'j' has been rubbed off.
Re:My Favorite Vim Oneliners for Text Manipulation by taneq on Sunday August 06, 2023 @08:34AM (#37021274)
None of the keys on my keyboard have markings on them. :D
Re:My Favorite Vim Oneliners for Text Manipulation by fuzztester on Sunday August 06, 2023 @02:45PM (#37025221)
Just worn out from use, or do you have a Das keyboard, the kind with blank keycaps?

I knew a developer who had one.

https://en.m.wikipedia.org/wiki/Das_Keyboard

Re:My Favorite Vim Oneliners for Text Manipulation by taneq on Sunday August 06, 2023 @08:15PM (#37028394)
Das Keyboard, yep.
Re:My Favorite Vim Oneliners for Text Manipulation by quickthrower2 on Sunday August 06, 2023 @11:23PM (#37029698)
Let me guess: Dvorak