Devs, Learn Vim Motions
Vim is magic.
Around 9 months ago, I stumbled upon a video by ThePrimeagen that changed everything:
Being an Arch Linux (btw) user, I was familiar with Vim, but mostly for simple config changes. I used VSCode for "serious work" (bad React apps). After that video, I promptly switched to NeoVim and embraced Vim motions.
Fastforward to now, I still use NeoVim. It's one of my best decisions I've made and has significantly improved my skills as a developer.
What are Vim Motions?
Let's clarify: this post focuses on Vim motion's benefits, not just Vim, the text editor.
Vim motions are powerful text-editing shortcuts. While synonymous with Vim, they're available through extensions in IDEs like VSCode, and even Chrome (opens in a new tab).
Why Use Vim Motions?
As seen in the video, Vim motions are:
- Fast
- Efficient
- Really really cool
Vim motions enable blazingly fast text traversal and evoke Hollywood-style hacker vibes by eliminating mouse use.
Programming involves a lot of coding, reading, and editing. You're going to be spending a lot of time doing these things as a developer, so it makes sense to invest the time learning and getting really good with your tools.
Getting Started
Vim has a steep learning curve; early progress might be slow. Embrace it, master the basics, and soon you'll be flying.
Ready to begin?
Start with VimTutor:
- On Linux and MacOS, Vim comes preinstalled.
- On Windows, you need to install Vim (opens in a new tab)
Then run "vimtutor" in your terminal or command line and follow the instructions from there.
Additional learning resources:
- ThePrimeagen's Vim as your editor series (opens in a new tab)
- VimGenius (opens in a new tab)
- Vim Adventures (opens in a new tab)
- FreeCodeCamp's Vim Cheatsheet (opens in a new tab)
Even if Vim isn't your go-to text editor, Vim motions can enhance modern IDEs via extensions. Start with your current editor and its Vim plugin. Once you're ready, give NeoVim a try and see if you like customising your own IDE.
Thanks for reading. May Vim transform your coding experience as it did mine.