Hacker News new | ask | show | jobs
by Retra 4222 days ago
I've been trying out vim for a while, hoping to get more productive, but the fact that "hjkl" is not "jkl;" -home keys- and that I have to reach all the way across the keyboard to hit [esc] every three seconds is not helping...

I pretty much use sublime text for everything these days.

4 comments

You can also remap Esc to jj by adding the following to your vimrc

inoremap jj <Esc>

The hjkl thing feels weird for a long time but it becomes natural after a while. I used Sublime for a long time with the Vintage plugin (vim like movements and some other vim features) before moving to Vim and that made the transition much easier for me. I still like Sublime, but Vim's full integration with the terminal environment is hard to beat.

Out of the box, ctrl-[ is mapped to escape. It took me about a week to un-learn Esc, but it is one of the better vim decisions I've made (along with mapping j to gj and k to gk, and mapping tab to :bnext).
You can map Caps Lock to esc. A lot of people who use Vim do that.
> but the fact that "hjkl" is not "jkl;" -home keys-

On American keyboards, anyway. That isn't how the keys are laid out on modern Dutch keyboards, though I don't know what they were like when Vim was created.

Vim inherited the keyboard mapping from vi. vi was designed on a QWERTY (American) keyboard, but the particular terminal that the author used had arrows printed on the hjkl keycaps.

More information at: http://en.wikipedia.org/wiki/Vi