I've been using vim for many years and have never really thought about it. A friend of mine asked why that is, noting that in our culture, left would usually map to up while right would map to down, making the vim keys backwards. I understand that they are on the home row, meaning that you do not have to move your fingers anywhere to hit them, but that's a different point altogether. Basically, my question is: does anyone know why these keys were given their present purposes? It would be great if you could point me to some documentation on the decision as well.
Vim uses hjkl because vi did. Vi used hjkl because its creator's keyboard didn't have physical cursor keys. Instead, the arrows were printed on the hjkl keys.
Probably one of our top feature requests. By Vim, I mean literally Vim, the command-line text editor. And by bindings, I mean keyboard commands that do specific things in the editor. Fortunately for us, CodeMirror, the code editor library we use, has a special add-on for Vim bindings.
n is a default mapping in vim. In particular, n repeats the last search from the cursor's position down. You recently searched for "final" so that's what it searched for. In general, it is pretty easy to find out what a key does with :help <key> while in vim.
The answer is in the wikipedia entry for vi. Bill joy, who wrote the visual mode of ex - which ended up being vim precursor vi - used a Lear Siegler ADM3A terminal on which the H, J, K, L keys mapped to left, down, up, right - and its been that way ever since.
Here's the keyboard layout:
A couple of other points of note on the ADM3A layout:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With