Live data from Hacker News

If you have failed to grok vim, ditch the arrow keys

h6o6.com

21–30 of 40 posts

Re: If you have failed to grok vim, ditch the arrow keys

#22
post #19
post #13

My #1 trick/recommendation? Use Control-[ instead of the Esc key. It's less hand travel and keeps your fingers on the home keys. It's all about minimizing your arm movements. The same goes for hkjl. The arrow keys are too far away, that's why you use hkjl. Embrace the lazy and you'll grok vim.

False! The #1 trick is to swap control and caps lock. The #2 trick is to use control-[

Have you considered swapping Esc and Caps Lock instead? Caps Lock is not very useful so tossing it into the corner makes sense to me.

Re: If you have failed to grok vim, ditch the arrow keys

#23
post #19
post #13

My #1 trick/recommendation? Use Control-[ instead of the Esc key. It's less hand travel and keeps your fingers on the home keys. It's all about minimizing your arm movements. The same goes for hkjl. The arrow keys are too far away, that's why you use hkjl. Embrace the lazy and you'll grok vim.

False! The #1 trick is to swap control and caps lock. The #2 trick is to use control-[

Some other approaches:

- use the caps lock as escape

- use the space bar as escape

- map jk or jj as escape

I've personally been using the escape key itself for so long it doesn't bother me. I no longer even notice that it's any further for me to reach than other keys, so I have no reason to switch. And that leaves all those other keys I mentioned above for other purposes. For instance, I've mapped the space bar to : Now if only I could remember to use it.

Re: If you have failed to grok vim, ditch the arrow keys

#24

I can't use vim effectively because I constantly try to navigate using WASD. I know I can bind it, but the thought of rebinding every command and then being dependent on towing the configuration to every computer I'd ever use scares me. So I use it on occasion with the same artfulness as someone on crutches trying to dance. Maybe someday someone will default an 'FPS' control layout.

Managing configuration on multiple computers is a pretty easy problem to solve. http://git.raylu.net/dotfiles/tree/

Re: If you have failed to grok vim, ditch the arrow keys

#25
post #4

Why not just use jikl instead if you don't want to lift your hand to move to the arrow keys. I am kind of tired of seeing this obsession with trying to get everyone to use hjkl which just doesn't make any actual sense. I totally get the point about the arrow keys requiring you to lift your hand but you can accomplish the same arrow key logic while keeping your hand in the same place.

There are a lot of other tools that use hjkl. Most commonly `less`, but also pentadactyl (http://5digits.org/) and a lot of tiling window managers.

Re: If you have failed to grok vim, ditch the arrow keys

#26

I have probably tried 3 times to ditch the arrows and use hjkl and I've failed each time. What is the trick to overcoming this? Perhaps it's that I've done it while at work that has caused the issue (ie. I need to be productive now!). Pick a weekend and force the switch?

First ditch up/down arrow keys and use jk instead.

After a few days when you are confortable with it. Start using hl for side arrows.

I did it like that.

Re: If you have failed to grok vim, ditch the arrow keys

#27
post #22
post #19

Earlier quoted context omitted.

False! The #1 trick is to swap control and caps lock. The #2 trick is to use control-[

Have you considered swapping Esc and Caps Lock instead? Caps Lock is not very useful so tossing it into the corner makes sense to me.

You can do both, actually. Using KeyRemap4Macbook, my esc is now capslock, and my capslock is ctrl if I use it with another key, such as ctrl-s, and esc when I use it on its own.

Re: If you have failed to grok vim, ditch the arrow keys

#28

I can't use vim effectively because I constantly try to navigate using WASD. I know I can bind it, but the thought of rebinding every command and then being dependent on towing the configuration to every computer I'd ever use scares me. So I use it on occasion with the same artfulness as someone on crutches trying to dance. Maybe someday someone will default an 'FPS' control layout.

The best way to learn to use vim's hjkl movement keys it to play nethack.

Re: If you have failed to grok vim, ditch the arrow keys

#29

I have probably tried 3 times to ditch the arrows and use hjkl and I've failed each time. What is the trick to overcoming this? Perhaps it's that I've done it while at work that has caused the issue (ie. I need to be productive now!). Pick a weekend and force the switch?

I was also unable to switch until I forced myself to go cold turkey. Putting this into your vimrc will disable the arrow keys

  noremap  
  noremap  
  noremap  
  noremap  
  inoremap  
  inoremap  
  inoremap  
  inoremap  
It's extremely painful for the first day or two, but it's worth it. (Starting on a weekend might be a good idea.)

Re: If you have failed to grok vim, ditch the arrow keys

#30

I have probably tried 3 times to ditch the arrows and use hjkl and I've failed each time. What is the trick to overcoming this? Perhaps it's that I've done it while at work that has caused the issue (ie. I need to be productive now!). Pick a weekend and force the switch?

what z92 said, and don't forget you can use w to jump forward by words, which makes side to side movement a little easier.
Post reply on HN