Hacker News new | ask | show | jobs
by 300 4373 days ago
"Everyone talks about the steep learning curve but no one talks about what happens once you finally get hjkl in your brain for movement. The answer is months of frustration, followed by finally having a usable editor, followed by knowing some cool tricks that you use in 1% of your daily workflow."

I've seen a lot of people saying this. I've met people who actually experienced this. And I can't listen to it anymore - so I've decided to write a book about how I learned Vim quickly, and how everyone can do this as well[0]. People just don't learn Vim the right way.

There's no need for months of frustration!

When I was starting with Vim, my friends were telling me something like "Just give it a few weeks, and you'll never want to switch back.". However, in every previous attempt to become good at Vim, I would give up after couple of days. Not because I'm someone who give up easily, but because I had lots of work to do.

And with every attempt of switching to Vim, I would spend most of my time on fighting with my new editor and not on the actual work.

The thing is, I didn't have to put so much effort when I first tried Sublime, or when I tried to switch to Textmate. They were downright pleasant.

What my friends were telling me (btw, advanced Vim users), was something like:

- "Turn off the arrow keys, it's not the Vim way..." - "Force yourself to use keyboard all the time, don't use mouse at all!" - "You have to learn x commands, and y things, so you could do z stuff..."

Then I realized - that was wrong! So, in my last (and the succesful one) attempt to switch to Vim (and finally learn how to be productive with it), I decided to don't listen to my "Vim masters" friends. I just decided that in the first couple of days, I'll try to use Vim as any other editor. Just like simple Notepad. No commands, no mappings, no plugins, etc. Just editing text. And that's how it all started.

With using some learning techniques, I've managed to get good at Vim really fast.

For example, if you can't get used to, or you're not productive with h j k l keys for movement, just don't use them. I don't use them. I use arrow keys all the time. Vim "masters" will probably judge me because of this - cause it's not the "Vim way". So what? I don't care. Arrow keys work for me the best, and I'm happy with it.

[0] - I'm in the process of writing a book - Mastering Vim Quickly (from WTF to OMG in no time) link: http://www.jovicailic.org/mastering-vim-quickly/

4 comments

For example, if you can't get used to, or you're not productive with h j k l keys for movement, just don't use them. I don't use them. I use arrow keys all the time. Vim "masters" will probably judge me because of this - cause it's not the "Vim way". So what? I don't care. Arrow keys work for me the best, and I'm happy with it.

I started using elvis and vim somewhere in the nineties and used the cursor keys until ~five years ago. I like hjkl more now, since I don't have to leave the home row and the cursor keys are awkward on Macs, but there is indeed nothing wrong with using the cursor keys if it's more convenient.

My approach to learning vim has been the following: start using it as any text editor until you are comfortable. Then take O'Reilly's vim pocket reference. Look for a command/movement that you think would increase your productivity. Try to integrate that command (and only that command) in your workflow. If you believe after a week that it indeed improves your workflow and enters your muscle memory, keep it, otherwise drop it.

Repeat this for some month, and you'll quickly learn the commands that increase your productivity the most.

This was my approach as well. When I started using Vim I used it almost like a normal editor, and spent most of my time in insert mode. Gradually I started spending more time in normal mode, and eventually I incorporated more advanced features like text objects and surround.vim into my daily editing.

Mastering Vim takes time, but the slope to learning it is pretty shallow. Learning Vim doesn't feel like a chore to me, because I just pick up new commands every so often.

Yeah, I've been using Vim as my main editor for around 15 years, and I still use the arrow keys.
If you don't mind me asking—where are you from?
We're from the same country my friend ;)
Nice to see that! Your upcoming book seems promising. I'll make sure I keep an eye on it :)