4 ms·
The best way to understand and use vim is to learn the "grammar" of vim and then practice using it until you have muscle memory for common movement and editing
by thesuperbigfrog 6y ago
The best way to understand and use vim is to learn the "grammar" of vim and then practice using it until you have muscle memory for common movement and editing commands.
This stackoverfow post explains how the vi/vim "grammar" works:
https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim#:~:text=Your%20problem%20with%20Vim%20is,want%20to%20cut%20whole%20lines.&text=If%20you%20only%20understand%20basic,of%20%22notepad%22%20for%20you https://stackoverflow.com/questions/1218390/what-is-your-mos....
A fun way to develop the muscle memory for the normal mode movement keys is to play Nethack (https://www.nethack.org/ https://www.nethack.org/) with the number_pad option set to 0 so that hjkl are used for movement, the same basic keys for vi/vim normal mode (https://nethackwiki.com/wiki/Options#number_pad https://nethackwiki.com/wiki/Options#number_pad).
- kyuudou 6y agoAnother fun game to play that focuses a bit more on vim itself: https://vim-adventures.com/ https://vim-adventures.com/ I definitely second playing nethack, whether you want to improve your vim skills or not.
- cheerlessbog 6y agoThat game is a labor of love by someone - I spent weeks playing it. So much fun solving puzzles and learning at the same time. If I had a criticism is that I'm not sure much has stuck with me. I still use the same 10-15 commands and all the obscure tricks it taught me are gone. Its worth the money just for the fun alone. Great to mess with on a laptop when you're on a plane.
- keithnz 6y agothe biggest problem is you buy the game for $25 and it only lasts 6 months, that seems a bit crap, doesn't really make sense to me to sell it as a limited time license, which is why I never bought it. But then I'm not exactly the target audience, I already know Vim, but I did enjoy the intro levels when I tried it a while back.
- cheerlessbog 6y agoThat's true but most people would pay that once or twice, which puts potentially small beans if it increases your productivity. Plus it's fun
- keithnz 6y agoI dunno, I don't buy things when I don't think the pricing is fair, regardless of whether I can afford it, as a gamer, $25 gets you a lot of good games that you keep forever. This one, you don't keep, to me it just doesn't feel right. I'm sure others feel differently, but, just putting it out there why I chose not to buy it where otherwise I would have.
- ma2rten 6y agoDo you really? I've been using as my primary editor for last 10 years or so, I rarely make use of the grammar. I sounds fancy and powerful in theory but I don't end up using it that often (even though I'm aware of it). That said I'm probably only an intermediate user, because I haven't put in the time to really make things like markers and macros part of my editing habits.
- leephillips 6y agoThat SO reply is a classic for a reason. If you don’t use the “grammar” you could be having a nicer time with your editor. Especially when editing code, being able, for instance, to pull out the contents of a pair of brackets, with or without the brackets, instantly, is quite convenient.
- mjbrownie 6y agoThats fine. The main thing is not to confuse technique with repertoire.. like a musical instrument, putting time in to mastering scales and finger technique will get you a lot of finesse in tackling musical pieces but it's the quality of your repertoire (in this context the algorithms/languages/higher problem solving knowledge) is what will be what gets you the money. Still a practising a few scales every now and then...
- bradly 6y agoThe book in the link has a chapter on grammar.