Since we are programmers, there are a lot of different things to learn. Some of these things are career essentials and others are non-essential things that can add to our work in different ways.
Vim is one of these things.
In this article, I'm going to share my experience, how I'm feeling in these first few days, this kind of thing... Let's start with two important disclaimers:
I will not teach what is VIM or how to use it. As says in the title, is been a weekend since I started, so I don't know how to teach somebody. Instead, watch this:
I don't think a true coder is the one who uses VIM, terminals, and old programming language (the stereotype of a VIM fan). In my career, I've seen many good developers who don't even know what is VIM and they can deliver an outstanding job.
Having said that, let's get started.
So, why VIM?
Vim is pretty old and its uses cause a long debate. My main motivation for learning VIM is to reduce mouse use, even my mouse being an ergo one, I feel a lot of pain in my wrists, a kind of burning in my hand. The pain gets worse as the week goes on. I think that a life with the less use of mouse as possible will be better for my wrist and my productivity, so, this is my main goal with this whole thing.
Don't start directly with vim, instead, use your editor extension
You don't need to dive in head-first to start this. If you use VS Code, Webstorm, or any other editor that supports VIM plugins or extensions, go to this way. This will drastically reduce your barrier to entry and will help you stick to it.
You will discover that learning VIM is fun
I don't know if this happens to everyone, but I love to learn a new thing (if it will be useful too, it's a perfect match!). Learning how to use VIM motions is teaching me about my coding habits and showing me better ways to do the things I'm used to.
Not everything is flowers
However, the transition hasn't been entirely smooth. Initially, I found the different modes to be a significant shift from the typical text-editing experience. Remembering the commands and getting used to not reaching for the mouse took deliberate effort and got me stuck sometimes. The worst part was (and continues to be) cutting and pasting text, a seemingly simple task, was the one that I stumbled the most, sometimes resulting in lost code or duplicated lines.
These moments were good to show that the learning curve on how to use VIM in the best way is still enormous.
You need to have a cheat sheet by your side
This is one of the best pieces of advice that I can give to someone in this topic. Like in the old days when I was at school learning how to code in C, the teacher wrote the language commands on the board so that we could learn as we were coding. I tried to rescue this technique and I always have an Obsidian file opened so I can quickly check a command when I get stuck.
You don't need to optimize everything
Again, the fun of learning something is to keep making mistakes until a better path emerges and you realize what you were doing wrong so you can make better use of the good side of what you learned. You don't need to optimize everything. Try to achieve a moment that you can feel comfortable with your tools and environment.
Stick to what you is used to
If learning VIM starts to impede your workflow significantly, it's okay to revert to your familiar setup. The goal is to integrate VIM into your workflow without compromising your efficiency or the quality of your work.
Your job is to deliver value not learn how to type better
While learning VIM is very common to be stuck in something or do wrong or even slower things while you are learning the best mode. Like in Chess, you need to have time to do the wrong things to figure out what are the best things.
Even if you think "But indirectly, if I type faster or be more productive, they (customer, leader, team) will care about it, of course, it is important to them". Yes, that is but it is something that must be done indirectly, without concentrated effort to do so.
If you feel that you are stuck or delivering your job slower, stop, take a rest, exit VIM plugin and just code the way you are used to. This will be better because you can still learn and still deliver value. Remember: your boss, your team or your customer don't care the way you type things in the computer, they need value.
Final thoughts
And you? Do you use VIM? Want to join me in this? Have more tips to share with the ones who want to enter this world?
Feel free to share your comments below: