Live data from Hacker News

Here is why vim uses the hjkl keys as arrow keys

catonmat.net

61–70 of 100 posts

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

#61
post #51

Earlier quoted context omitted.

I'm using the silent ([EDIT: I had this in reverse..] cherry mx brown; non silent is cherry mx blue) DAS keyboard[1]. The "professional" model has the letters on the keys, if you don't want a blank one. They seem to come in both US (wide enter) and UK (tall enter) versions. I personally chose the UK one as that's what I'm used to. Here[2] is a photo of my keyboard. The coloured keys are sold as WASD/escape keys but I…

I also have a Das keyboard and it is really awesome. (Also, I think it's the best looking keyboard I have ever seen--very minimalist.) However, I think you have them backwards--the "silent" version has the brown switches and the normal version has the blue switches. I also have the ultimate silent version and it is not really silent --it's just quieter than the other version. You still get a satisfying noise when you…

You are of course right! I have a brown, not a blue! Not sure why I was thinking about it in reverse - oops.

Well, mine is quieter than other keyboards I've used, eg a Dell keyboard[1] as long as you don't bottom the keys out, though I do get the occasional loudish click when the keys snap back, usually from the space bar, though if I slow down when typing I can make it almost completely silent (obviously thats not normal typing though).

[1] I did have a Saitek eclipse a few years ago that was quieter.

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

#63

Earlier quoted context omitted.

I'm using the silent ([EDIT: I had this in reverse..] cherry mx brown; non silent is cherry mx blue) DAS keyboard[1]. The "professional" model has the letters on the keys, if you don't want a blank one. They seem to come in both US (wide enter) and UK (tall enter) versions. I personally chose the UK one as that's what I'm used to. Here[2] is a photo of my keyboard. The coloured keys are sold as WASD/escape keys but I…

I'm using the loud, non-labeled DAS keyboard Model S Ultimate, typing with Dvorak layout. It cost's a small fortune, but it's so worth it. I love this keyboard. http://www.daskeyboard.com/model-s-ultimate/ Mostly keep my vim key-binding mappings small, so I'm not confused when working with it with default settings. Mostly use -c to get out of insert mode though, escape is so far.

It did cost a lot, but honestly, as a programmer I type so much, its totally worth investing in a good keyboard and I love my DAS keyboard.

The only thing I wish is that the keys were in a flat grid rather than staggered, but it seems very very hard to find any keyboard like that, so no biggy. I've considered getting a Kinesis for years now too, but since I got the DAS, I've had no plans of switching any time soon.

I haven't completely worked out my vim bindings since I've been doing a lot of Qt development in QtCreator lately and just used that without vi mode. I use Colemak for my layout so some of the default keys are a little less than optimal, but I also don't want to change them too much. With one or two simple key swaps it seems quite usable though.

On windows (where I don't use vim) I did map alt-gr to some common programmer symbols; mapped caps lock to control and control to backspace. On my laptop I use vanilla colemak though (including caps lock as backspace, though I'm likely going to change that some time).

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

#65

Earlier quoted context omitted.

Agreed, learn Colemak instead ;-) Seriously though, I think with a tiny bit of key-swapping in the vimrc, you can use dvorak or colemak just fine.

+1. Dvorak needs to go the way of the dodo. Colemak:Dvorak::Dvorak:Qwerty. http://colemak.com/

I love colemak. While I'm still not quite as fast as I once was with qwerty, it does seem to take less effort and my fingers seem to dance over the keys as most key combos do really seem to be placed side-by-side.

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

#66
post #11
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.

Probably because it didn't have dedicated arrow keys. Many older terminal keyboards didn't.

And the reason they didn't was that they evolved from typewriters that relied on a forward/backward spin to move up and down (except for the carriage return lever). We're lucky that the original terminals didn't have a scroll knob on the left and right of the machine to move up and down and a lever to move to the next line or we would have been stuck with that concept for years and the laptop may not have been invented because the knobs and lever would have required some elevation, which means the whole thing would have had to have been bigger.

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

#67

This feature of vi/vim along with not being able to save and quit as quickly as I can in emacs (ctrl-s ctrl-x, baby, none of that :q! shite) is the reason I use emacs. I totally respect those that use vim, but I'm not a freaking machine.

To save with [Esc],w add the following to your ~/.vimrc

  " remap  to ,
  let mapleader = ","

  " save with ,w
  nmap w :w

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

#68
post #49
post #36

Earlier quoted context omitted.

I prefer caps lock to Control. ^C does the same thing as escape in Vi[m]. While it is chording, the combo is pretty easy to hit. This is a bit of a compromise, but all the other programs that are not vim will benefit from it.

Never knew that Ctrl-C does the same thing as escape. Thanks for the info!

Another issue: if you ever use Ctrl-C in a macro, and then try to rerun it, the macro ends on Ctrl-C.

I use ^[ to end insert mode.

This only happens when you use macros like I do. I took a look at my registers and here's a random one I did four months ago (using Surround.vim to wrap an indented area in div tags).

V/^[ ]\{0,2}[^ ]/-1^MS<div class="question"^M

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

#69
post #46
post #19

Earlier quoted context omitted.

Just never decide to learn dvorak.

I use dvorak with vim with (mostly) standard key bindings. It's not too bad. H and K are not far from their respective QWERTY positions. J and K remain next to each other.

Tip from a dvorak vim user: instead of H/L for moving left/right, use H/SPACE. SPACE has almost the same function as L but is more convenient to hit with your thumb. SPACE also allows moving to the next line when the cursor it at the end of a line, unlike L.

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

#70
post #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 w…

I smiled when I saw how you call them "unibody" terminals. We have come a long way since then. :)

When my dad bought a DEC Rainbow 100, I loved loved loved that I could move the keyboard. Such a boon!
Post reply on HN