The Vim Motions That Changed How I Edit Text
The Vim Motions That Changed How I Edit Text
Not all Vim motions are created equal. Some are clever. A handful are transformative. These are the ones that made me realize Vim wasn't just a different editor โ it was a different way of thinking about text.
Text Objects: The Mental Shift
Before Vim, I thought about cursor positions. In Vim, you think about objects: words, sentences, paragraphs, things inside brackets.
ciw โ change inner word. Doesn't matter where the cursor is on the word. It just works.
ci" โ change inside quotes. Everything between the quotes, gone. Ready for you to type.
da( โ delete around parentheses. Takes the parens too.
The pattern is: [operator][inner/around][object]. Once you internalize this, editing text feels like talking to the editor.
f and t: The Horizontal Superpowers
f{char} jumps to the next occurrence of a character on the current line. t{char} jumps to just before it.
dt" โ delete to the next quote. cf, โ change to the next comma.
These seem small. In practice, they shave seconds off every edit, dozens of times a day.
Marks: Teleportation
ma sets mark a at the current position. `a jumps back to it exactly. 'a jumps to the line.
For big files or multi-file work, marks are instant navigation across previously visited locations.
The One That Gets Everyone
% โ jump to the matching bracket.
You're on a (, press %, you're on the ). Press again, back to (. On any bracket type.
When you're debugging nested structures, this is invaluable.
Wrapping Up
These motions don't require plugins or configuration. They're in vanilla Vim, waiting. The editors who seem impossibly fast at editing text โ this is what they know.