6 ms·
Wow, the bit about seeing vim commands as sentences composed of nouns, verbs and adjectives blew my mind. I thought about learning vim, but I didn't know about
by zaptheimpaler 14y ago
Wow, the bit about seeing vim commands as sentences composed of nouns, verbs and adjectives blew my mind. I thought about learning vim, but I didn't know about this, so vim commands seemed like some arcane language that I would have to gradually get proficient at over months.. this might make the transition a lot easier.
- solutionyogi 14y agoYep, that's the zen moment right there with Vim. Once you understand this, you will be able to 'speak' to your editor and bend it at your will. E.g. 't' is a motion command which takes you 'till' a particular character. The same command even works with 'Visual Block Selection'. Most of the other editors have a different work flow for 'Block selection' and they are not friendly at all. And if you are starting out, I would HIGHLY recommend the book 'Practical Vim' http://pragprog.com/book/dnvim/practical-vim http://pragprog.com/book/dnvim/practical-vim . The book teaches the 'The Vim Way' and to be a good Vim user, you have to understand the 'The Vim Way', there is no way around it. Good luck!
- tolos 14y agoMore on vi as a "language:" http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim?page=1&tab=votes#tab-top http://stackoverflow.com/questions/1218390/what-is-your-most...
- brown9-2 14y agoThese articles are also helpful: http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive-guide/ http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-d... http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-nouns-and-modifiers/ http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-n...
- bcrescimanno 14y agoLearning to see the commands as a language is helpful; but, it doesn't really reach its full power until you start to see files in terms of the various groupings that Vim affords you (either the out of box things or custom text objects). If you stick with Vim, you'll start seeing things like whether or not you want a word or a WORD, or around (a) or inside (i) an object. Moreover, start to pick up on when you're hitting the same key multiple times or repeating a command. There's almost always a faster way to do something than repeating a command N times. I'll be totally honest, it takes time and a real commitment to using Vim as your only editor. But, over time, you'll start to think in this text objects and, combined with the "commands as a language" concept--that's when Vim will really start to show it's power.
- johncoltrane 14y agoI agree on everything. You didn't mention the fact that all of this becomes addicting rather quickly: going to a more "normal" editor or textarea can be extremelly frustrating some times.
- possibilistic 14y agoIncredibly frustrating. I have trouble when I have to use other PCs or devices. I can no longer use the "arrow keys" and get momentarily confused when hjkl are showing up in the textarea instead of giving me movement. And I can't tell you how many times I hit escape in LibreOffice/Calc/etc. This is one reason why I don't use online editors like Google Docs. They don't have great vim keybindings. Even extensions like Vrome and Vimperator fall just a little short. And for apps that do have a subset of the bindings--they are almost worse than having no bindings at all; evince has hjkl, but no gg/G, etc. It drives me mad. I've configured AwesomeWM to be vim-like, but how I wish there was window toolkit-level support for vim bindings! In fact, I wish I could run everything from vim.
- alttab 14y agoI've IM'd :wq to my wife more times than I can count.
- Lapsa 14y agotry ZQ :)
- possibilistic 14y agoThat's great! Such a simple anecdote, but it made me smile.
- Jabbles 14y ago:x is virtually the same as :wq, except vim won't write the file if you haven't changed it.
- 14y ago