• Welcome to TalkativeTurtles - a community for developers & tech enthusiasts.
  • Share projects, get code reviewed, and talk tech without the noise.
  • New here? Introduce yourself in the Introductions forum!
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Title: Vim motions - are they actually worth learning?
Threaded Mode
#1
Hot take: yes, but not for the reason most people claim.

The usual argument for Vim motions is speed - moving without a mouse, text objects, composable commands. The speed argument is mostly a distraction. The real value is precision - being able to express exactly what you want to do in terms of text structure rather than cursor position.

"Delete everything inside the parentheses" as di( is faster than click, drag, delete - but more importantly, it's less error-prone. You're not approximating with a cursor, you're describing the operation.

Things worth learning, roughly in order:
  • Basic movement: hjkl, w/b/e (word), 0/$ (line start/end), gg/G (file start/end)
  • The operator + motion pattern: delete, change, yank + any motion
  • Text objects: iw (inner word), i"/i' (inside quotes), i(/i{ (inside brackets)
  • f/F and t/T to jump to characters on the line
  • . to repeat the last change - this one is secretly the most powerful

How to actually learn them: Install a Vim plugin in your current editor (VSCode Vim, JetBrains IdeaVim) and use it for a week. You'll be slower at first. Push through. By week two it starts to click.

You don't need to switch to Neovim or abandon your IDE. The motions work in almost every editor with a plugin.

Using Vim motions currently? What's your setup?
Reply
  


Forum Jump:


Browsing: 1 Guest(s)