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

Vim bindings operate on commands that can automate many of the daily work you do in a text editor besides inputting text and search & replace. Deleting or copying text inside delimiters or by lines, changing words in place, recording and replaying macros, etc. are all possible with a few keystrokes. Since commands are generic and composable, once you learn the few basic ones you'll be able to come up with combinations of your own that make you more productive over using a mouse and a traditional graphical IDE. If you've ever seen a Vim master at work you'll notice how quickly they manipulate text on screen. It looks almost magical, which certainly makes it difficult to follow for anyone else watching, but to them it's the most efficient use of their time and brain power, since the binding-to-command mapping has become muscle memory. Using a foreign IDE would cripple their productivity.

While it's true that most programming is spent thinking about the problem rather than manipulating text, the benefit of modal editing and Vim bindings is not only in the saved time, but also in removing the barrier from thinking about how you want to change the code to actually changing it. That leaves you more time to think about the problem, but also doesn't interrupt "the flow" by having to think about moving and positioning a mouse cursor in a GUI, which is always a more mentally draining action than typing a few keystrokes.




Your examples of automation are all possible with multi-cursor edits as well. To me it's exactly the right mental model - I can do mass edits with the same commands I've learned in single cursor edits, and, maybe more importantly, I have immediate visual feedback between the edits I compose this way. I'd recommend anyone thinking about learning Vim to give this a try first and then evaluate whether there is any additional benefit from spending a lot of time learning Vim commands.




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

Search: