The motion that changed everything

I switched to Vim a long ago after using a series of GUI editors like TextMate and Sublime Text. The urge for novelty has me still try out GUI editors sporadically, the most recent one being Zed. But I always come back quickly. I’m doing all my engineering work from the terminal, and by now my tooling is more or less complete and highly optimized for efficiency.

What brought me to Vim was the thought, “It’s installed on all my Unix and Linux servers, I should have at least some basic proficiency.” What made me stay was its “command grammar”; first and foremost, Vim motions.

I have to admit that even after decades, I only rarely use the number-based motions. Instead of 4dd, I mark lines for deletion in visual mode. And although I have relative line numbers switched on, I still end up holding k like an animal.

What makes Vim great for me are the motions that are based on text. For example, quickly jumping to the next colon with f:. Or selecting the current word with * and immediately being able to jump to its next occurrence with n.

Another neat feature isn’t exactly part of Vim motions, but text objects are closely related. It’ll never stop to make me smile when I can edit the contents of a pair of quotes or parentheses as easy as ci) or da".

BTW, if you’re looking for a comprehensive Vim tutorial, try the freely available chapter “Text Editing Fundamentals“, part of my community course “Basic Linux System Administration”!

This post was inspired by and written for “Hyde’s Vim Carnival“.

One Comment

  1. @blog Pinging @hyde

Likes

Reposts

Leave a Reply

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)