7 ms·
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" real
by rauljara 15y ago
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.
- cheatercheater 15y agoI 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 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.
- bryanlarsen 15y agoThat'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?
- dkersten 15y agoI'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/ http://www.daskeyboard.com/model-s-ultimate-silent/ [2] https://plus.google.com/u/0/photos/100355674716107842386/albums/posts/5676123139988463922 https://plus.google.com/u/0/photos/100355674716107842386/alb... [3] http://www.djtechtools.com/2012/02/27/introducing-the-midi-fighter-3d/ http://www.djtechtools.com/2012/02/27/introducing-the-midi-f...
- tikhonj 15y agoI 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.
- dkersten 15y agoYou 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.
- Seth_Kriticos 15y agoI'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/ 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.
- dkersten 15y agoIt 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).
- sswezey 15y agoYou 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.
- cheatercheater 15y agoIt 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.
- bryanlarsen 15y agoOh 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.
- cheatercheater 15y agoThe 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 :)
- keenerd 15y agoI 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.
- cgmorton 15y agoAnother 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 http://vim.wikia.com/wiki/Avoid_the_escape_key
- mgedmin 15y ago> As a digraph they never occur in a natural language I wonder how Dijkstra would react to that statement.
- aptwebapps 15y agoOr all those people whose handle is JJ?
- comex 15y agohttp://en.wikipedia.org/wiki/Hajj http://en.wikipedia.org/wiki/Hajj
- jedbrown 15y agoIt'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.
- TheEzEzz 15y agoI 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.
- karamazov 15y agoOnce you get used to hjkl,it's pretty "intuitive" (in that you don't need to think about what you're doing).
- nirvdrum 15y agoUnless 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.
- hyperbovine 15y agoI 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.
- cgag 15y agoYou don't use your pinky for hjkl either, or use shift.
- TheEzEzz 15y agoGood 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.
- ilaksh 15y agoThe 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.
- slowpoke 15y agoI 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.
- cheatercheater 15y agoYeah, I do that. One reason why I hate laptop keyboards!