- there's a visual mode for selecting text
- I can now yank and paste text in normal mode
- I learned to use :split and :vsplit to open new files, and ctrl-w to switch between them
- I learned a few new navigation commands
- I learned that there's a replace mode (R)
Definitely useful, and I hope I remember everything the next time I open vim!
But I still feel like I'm just scraping the surface. One hour is very little time to learn about the power of vim.
The first and most important things to understand are:
- Normal mode is the default mode. Only leave it when you already know what you want to write.
- Movement follows the [<count>] <verb> <target> model. The most used verbs are: d, y, p
The most used targets are j, k, f, F, /, w, W, e, b
Other useful keys to know and use: a, A, o, O, *, ., %
And lastly, learn how to use macros! (q, @)
If you just learn everything I listed here (and it isn't much), until it feels natural, you already know 90% of what you need to boost your editing speed and use vim like a pro.
My struggle with vim is that it just slows me down. I'm used to the way that text editors work on the Mac, and I'm really fast with them. Working in Textmate or Sublime or Xcode or even BBedit feels natural to me. But as soon as I switch to Vim, everything feels difficult.
I think a big problem with Vim is that it's really hard to learn when it's not your primary editor.
> In the last year, How to exit the Vim editor has made up about .005% of question traffic: that is, one out of every 20,000 visits to Stack Overflow questions. That means during peak traffic hours on weekdays, there are about 80 people per hour that need help getting out of Vim.
Next time you're stuck somewhere without internet, as I was, give vimtutor a shot.
I'm going to do an experiment. I've been struggling with Vim for a long time. I need to leave in about one hour. Instead of wasting time here on HN, I'll now spend an hour learning Vim.
I doubt that this will get me very far, but I'll let you know how far I got.