Hacker News new | comments | show | ask | jobs | submit login

There is definitely a basic set of commands to remember, but the real power of vim is that it forms a succinct and consistent text-editing language where complex operations can very often be synthesized from what you already know about it.

For example, there are a set of commands that move the cursor in different ways (beginning of line, end of line, first line, last line, line #x, next word, previous word, etc. (that's ^/$/gg/G/g#/w/b) ), and a set of commands that performs actions (copy, cut mostly (y/d)). The real magic is how the two sets interact.

I don't have to memorize the sequence of keys to delete a word; I know the key to cut (d), and the key to move a word forward (w). I press d, then w, and the word is gone! It's a whole world of editing possibilities.

My secret shame: since I use GUI vims almost exclusively, I've never developed the muscle memory for hjkl movement; I use the arrow keys. When I started out, I knew i, esc, and that, and I figured out the rest as I needed it.




I think the real joy of vim is in the next level, when you start depending less on movement commands in favor of text objects.


or you try to finish your HN comment with :w


Yeah, vim follows you everywhere. I'm forced to edit someone's Word document and I have to erase the vim commands that I embedded in the text. Etc.


I press d, then w, and the word is gone!

There's got to be a better reason to use vim than this. I mean...the standard for every other editor is ctrl-shift-left arrow, then the delete key and the word is gone! Whoopee.

It works in most editors, even Microsoft notepad and this textarea I'm typing in right now. I use unfashionable, clumsy old eclipse most of the time and could probably list 100 important things it does that vim never could. Things that actually matter. Maybe I'm wrong, but I doubt vim can launch and debug and continuously deploy to Apache tomcat. That sort of thing.




Applications are open for YC Winter 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: