Comment

Comment by rmunn

Huh, I never noticed that 0 is on the right side of the keyboard, even though obviously I type it every day so I knew that at some level. Because I think of the vi keybindings by their meaning, not their location. `y` is yank, `d` is delete (and copy to the clipboard, so basically cut, but the mnemonic is delete), and `0` is go to column 0. And `$` means end of string in regex, so that's what it means in vi. (And `^` is the vi shortcut for "go to first non-whitespace column", which is close enough to the regex meaning that I find it easy to remember as well).

Yeah, if keyboard positioning matters to your brain then you're going to be really annoyed by 0, a key far to the right, meaning go to the left. But the only vi keystrokes that are assigned by keyboard position rather than meaning are the h/j/k/l navigation keys. Everything else has a meaning-based mnemonic, and until I read your post I hadn't ever thought about their position. I want to press 0, my touch-typing class from my teenage years has drilled that key's location into my hindbrain, so my fingers reach up and press it without thinking about its location at all. The only thing that went through my concious mind was "I want to go to column 0" and then boom, I had typed it.

parent rmunn 21 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton