Why you should learn Vim (motions)


Disclaimer: This post is not about convincing you to give up your lovely IDEs like VSCode or PHPStorm

Vim journey is damn paint and excited

I'm pretty sure lots of you hear about Vim, a kind of alien text editor, hard to learn and nobody wants to open it. That's why lots of people searching "how to exit vim" (including me) on the Google.

google search

"Vim" is a common term in my post, exactly, I did try Vim, then switch to Neovim because it's more active and grows with lots of improvement.

Every Vim user has their own config file because you have to install lots of plugins to make it works (for you), and lots of key binding to remember because using a mouse sucks, but that's the point. You just need to remember the stuff you used most, and your muscle will do it for you. And finally, you have your dream IDE, and there is no colleague wanna touch your IDE.

I don't use Neovim anymore

My daily job is about web development, I also do lots of frontend stuff (Tailwind CSS, React, ...) in the macOS environment. Nowadays, PHP is growing so damn fast, and there isn't a good PHP Language server enough, and I don't have time to configure my Neovim (of course had to work hard because of low salaries 🥲) which can compare to PHPStorm, so I install IdeaVim, and that all that I need. For frontend stuff, I used VSCode with vscodevim plugin

I think macOS and Vim motions are the best combo, tho. Because almost keybindings on macOS use Cmd and vim use Ctrl, it won't have many conflicts like on Windows and Linux.

Treat Vim like a toolkit

If you don't know Vim, you are still ok, but if you know Vim, you would have a powerful toolkit, is that sound great?

You don't have to use vim as your code editor, daily working. You just need to know Vim motions, that would help you so much.

You're a coder, so most of the time you're writing code, Moving in Vim, basically, you just press h, j, k, l, and don't have to lift your right hand to press arrow keys, that's suck. Using vim, almost time you jump between points in the editor, not line by line as traditional, or scrolling your mouse :(, (how to do it, you need to find yourself).

When you ssh in your Linux server, and modify some configuration files, you can use nano, and spam your arrow key to move around your file, that's terrible, vim is a savior with lots of no-brain keyboard shortcuts to save your time: G, gg, C-f, C-b, dd, %, w, b,... You see, they are random bullshit keybindings but it works 🤣,

Anyway, you can ssh into your production server and edit source code using vim, that's real-time deployment 🔥.

If you know vim, you can do coding in terminal like a pro hacker with a black background , your colleague girls will love you.

So my combo is using some basic vim motions in my editors, that's enough for me, I can quickly be supported the latest features of language and framework (lining, validation,...) via extensions, and feel comfortable when away from the mouse. Mark my words, the more you use vim, the more you love it.