Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why people always emphasis h/j/k/l when we already have arrow keys? Do you really waste a lot of time moving your fingers between them? Also, arrow keys work in insert mode.


If you touch-type, keeping fingers on the home row is essential. So, yes, it's a huge waste.


+1 But I remapped the movement keys to j/k/l/; to avoid moving my left-index finger.


Same here, actually. Although in dvorak, they're htns :)


Yes, absolutely. This hjkl navigation (combined with other vim code motions) you can really fly are files.


It's absolutely worth it. After many years, I don't even think about it any more. I just navigate using the home row. In fact, when I look at the keys, I can't tell you which ones go in which direction. I have to think about what my fingers do when I want to go in that direction. After time, it becomes sub-conscious, like playing a videogame.


This is a perfect place to post a Vim tip that I think helped me the most in starting out.

Disable arrow keys.

It's extremely painful for the first 5 days but I promise that's all it takes to get use to it. And it makes huge difference in your productivity. All that time does add up.

Add the following to your .vimrc

    map <up> <nop>
    map <down> <nop>
    map <left> <nop>
    map <right> <nop>
    imap <up> <nop>
    imap <down> <nop>
    imap <left> <nop>
    imap <right> <nop>
The reason you want arrow keys disabled in insert mode is that arrow keys breaks the modal paradigm. Again, I promise that once you get comfortable, it becomes more efficient to go into editing mode and make the change rather than navigate via the arrow keys in insert mode.


I learned vim's movement keys by playing nethack on a laptop without a number pad. This is a very fun way to learn hjkl. It also punishes you quickly if you make a mistake.


And then your arrow keys are free to bind to something else useful, like moving between split windows, buffers, etc.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: