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

OK, it's been about an hour. I learned the following:

- 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.



I've been using Vim and vim-derivatives almost exclusively for the past 15 years, and I think none of the things you mentioned are important to use 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.


I already knew some basics of vim, as I've been semi-regularly using it for a long time to edit files on the command line. Everytime I ssh into a server I use vim to edit text files. I can get everything done that I need to do.

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.


That's all good, but can you quit it? Sorry, had to be cheeky!



Shocking stats about trying to exit vim:

> 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.


That's fantastic. All the vim people always raving about how much productivity they gain from vim, we can point to an objective measure of how much productivity it's ux destroys too.


You are just scraping the surface but that's ok. I've been using Vi/Vim for over 20 years and I'm still learning it but to me, that's what makes it so much fun! I learn a new thing (e.g.; `%` for toggling the cursor between matching things like parens) and then try to use that as much as I can for awhile until it's integrated into near muscle memory. Then I get the itch to learn more and so I dive back in.




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

Search: