Hacker Newsnew | comments | show | ask | jobs | submit login

Most of the answers I've seen as to why hjkl have fallen into the "so your fingers stay on the home row / it's actually quite fast once you get used to it" realm. But those answers were never completely satisfactory to me. Once you get used to it, it's fine. But I feel like it would have been fine as adsw, or jkl; (so that your hand really is on the home keys) or some other 4 key combination near the home row, too.

This explanation of the origin hjkl is the first one to satisfy me. Now I can see the others, not as explanations as to why it is, but explanations as to why it stuck.




I have another good suggestion: learn pressing the left control with the side of your palm. It's usually a very minimal movement, and I find it a lot easier (and less straining) than moving the pinky to press control. The only drawback is that it doesn't really work on a laptop keyboard.

I picked that up a few years back playing World of Warcraft and some other games, to avoid having to move my left hand away from WASD as much as possible, but it has served me very well in a lot of other applications since then.

Edit: Well, that was supposed to be an answer to cheatercheater below this comment. Woops.

-----


Yeah, I do that. One reason why I hate laptop keyboards!

-----


I use JKLI. The two main advantages are that you don't use your pinky finger repetitively, and the layout of JKLI makes intuitive sense as to what each key does.

-----


Once you get used to hjkl,it's pretty "intuitive" (in that you don't need to think about what you're doing).

-----


Unless you use Dvorak. I know I'm in a super minority here. But shortcuts based on keyboard location rather than tied to some mnemonic are damn near impossible to get right. Doubly so when I have to switch to QWERTY to work with anyone else.

-----


I switched cold turkey to Dvorak and Vim at practically the same time (what can I say, I like pain :) I learned Vim mnemonically and have no problem using Vim on QWERTY. At the same time, I could have just as easily learned it "locationally" and been screwed. Only chiming in because I think it's interesting that the learning curves for location-vs-mnemonic seem approximately equal, but the long-term payoff of one is much greater. Neat asymmetry.

-----


You don't use your pinky for hjkl either, or use shift.

-----


Good point, not sure what I was thinking. For me the strain of moving my index finger from J to H is more than the strain of moving my middle finger from K to I, but that's probably quite subjective.

-----


The reason it stuck is because it was grandfathered in, not because it is the best way to do it. Same as most things, like qwerty etc. People just naturally do things the way they always did things.

-----


I have created an ergonomic layout based on the us layout, called us_split. In it, Vim's hjkl actually are the home position. The layout works under Gnome. It's just like qwerty but a bit different. Basically the two columns from the right are put in the middle. Time to learn to use it fluently is only a couple of days if you touch type qwerty already.

https://bitbucket.org/cheater/us_split/overview

I see a lot of people in the comments talk about vim's "weird" layout choices. I suggest in your OS you change caps lock to esc; and that in vim you remap ; to : and : to ; in order to stop having to press shift every time. You can then really start doing the whole home row thing; IMO it's impossible without those two crucial settings.

-----


That's a brilliant layout. Unfortunately it appears to require a "tall enter" keyboard rather than the much more common "wide enter". I'm in the market for a nice cherry blue keyboard, so I'll see if I can find one with a tall enter. Anybody have any sources?

-----


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 used them for playing Skyrim - the green one on the right is especially handy for gaming as i don't have my fingers on the home row when playing games rather than typing. The blurred circuit board is a development version of the Midifighter 3D[3] as the photo was taken before they were announced.

[1] http://www.daskeyboard.com/model-s-ultimate-silent/

[2] https://plus.google.com/u/0/photos/100355674716107842386/alb...

[3] http://www.djtechtools.com/2012/02/27/introducing-the-midi-f...

-----


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 use it.

I've been really satisfied with it, and would definitely recommend it to anybody looking for a nice mechanical keyboard.

-----


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.

-----


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 <Ctrl>-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).

-----


I bought a das keyboard last year for home. I got the blank keyboard, but found that a lot of random hand issues went away. I ended up buying myself a second one for work, and will absolutely not go back to a standard keyboard.

-----


You my friend should check out The Keyboard Company, keyboardco.com

They have tons of choices of blue, black, and brown Cherry switches (I think), you just have to match up their terminology with the right color.

They ship from England too, fyi.

-----


It works for horizontal enter as well.. the only key that is missing from a horizontal-enter keyboard is the one between left shift and z, which is just backspace, so you can disregard it. It's just that with a horizontal enter key, the ; key is above the enter. With a boot-shaped enter key the ; is next to l, which makes it easier for me to hit it. I use the command line a lot.

If you're looking for a good place that does boot shaped enter keyboards then you can use Unicomp's Model M. You can rearrange the keys as you wish and they'll even print key caps with anything you want on them with the home row indicator tab, so you can put one on the h key.

-----


Oh yes, you're right -- the only difference is the swap between semicolon and enter. Good for Ruby, bad for C.

The only problem with your layout that I see is the right shift key -- you lose a key because it's covered by two fingers. I'm definitely going to give it a try.

-----


The right shift key is covered only by the pinky finger of your right hand. The ring finger has the forward slash. If you give it a try make sure to send your comments over via bitbucket or something :)

-----


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.

-----


Another excellent trick I read somewhere is to map 'jj' or 'jk' to esc when in insert mode (so 'inoremap jj <ESC>'). As a digraph they never occur in a natural language, so you'll never type it accidentally. And you can hit it on the home row easy-peasy.

Although personally I type in Colemak, I still use this, just with 'yy' instead. To be honest, it's a barely noticeable slow-down but it's much less stressful for my hands.

There are really a lot of ways to do this. See: http://vim.wikia.com/wiki/Avoid_the_escape_key

-----


> As a digraph they never occur in a natural language

I wonder how Dijkstra would react to that statement.

-----


Or all those people whose handle is JJ?

-----


http://en.wikipedia.org/wiki/Hajj

-----


It's common to use double letters (ii, jj, kk) as inner indices when writing tiled multi-dimensional array code. Regardless of whether you think that is a good convention, you should be preserving that convention if you are editing legacy code that was written that way.

-----


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

-----


They're not exactly the same thing, actually, ctrl-c doesn't allow you to expand abbreviations and doesn't trigger the InsertLeave autocommand, but to be honest, I don't think it's that big of a deal. I go between ctrl-c and ctrl-] without thinking.

-----


If you use q: or q/ to edit the command or search history, ctrl-c will close the edit buffer rather than swap out of insert mode.

-----


Also, 3aa<Esc> appends 3 a's, but 3aa<C-d> appends only 1.

-----


Life changes. Yet again. Thank you, thank you ..

-----




Applications are open for YC Winter 2016

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: