How switching to VIM DIDN’T help me to be more productive
Filipe Monteiro
Posted on December 8, 2020
TL;DR: If you came here for the title, I’d like to apologize, I like VIM and although I don't think it helps me to be more productive, it's fun to code using VIM.
2013 was the first time I heard about VIM, while editing apache configuration files in a linux server. I used to use Nano for the job, and couple friends tried to convince me that VIM was the way to go.
Nano was more than enough for me: Open, Edit and Save files, that’s all I needed. Why would I use a program that I didn't even know how to close it? No way!
Over the years, I got more curious about VIM, many developers could affirm that they were more productive, just by using VIM. That's mind blowing, isn't it?
Then I thought: Why not give it a try? After a couple days trying and reading about all different commands I had to learn, I was completely sure: It couldn’t make me more productive! The reason: Learning more commands to code didn’t make sense at all. Mouse + a few command/ctrl + arrow commands were absolutely more than enough.
When did VIM make sense?
In April 2019, I decided to give it another try. This time, I was committed to make it right and get into it for real to see if there really was a benefit on VIM. I’ve bought and online course on Udemy, Vim masterclass, and took all classes patiently, as I was learning a new programming language.
I got impressed with all the things VIM could provide.
All the motions, modes, registers seemed simply awesome. The fact that I could scan a file without editing it was amazing.
Deleting a word or a couple words with only 3 key strokes was neat. If you’re curious, open a file on vim, and press: d2w. (delete two words).
After the course, I moved slowly, started by setting up the vim plugin into my VScode, relying in all the easiness that VSCode provides and yet I could practice vim commands.
I use the vim plugin for a while and struggled a lot on the first months. Mixing wrong commands, forgetting about caps lock turned on and I was coding slower than I would with normal setup.
Fully Switching to VIM
The full switch to VIM happened in 2020 (the year this blog post is written).
The reasons:
- Although is great to have VIM commands in VSCode, the best plugin isn't that perfect yet, and there were a couple commands that were super slow, and just moving around in a file was painful.
- I was so upset with my VSCode eating up 4gb of RAM with only one project open.
I started to plan for a full switch.
After some back&forth from VSCode to VIM, I’ve found a tutorial from Ben Awad (https://www.youtube.com/watch?v=gnupOrSEikQ), helping to set up vim as a full IDE for typescript/react projects. I got his dotfiles, added some tweaks and went heads down on that.
More struggle! I’ll have my criticisms to VIM listed below, but here is one: One of the most powerful things on VIM is extensibility, plugins are first-class. But that’s what makes it so complicated to use as your main coding tool.
After a long set up process, do and undos, VIM (Neovim) is my official code editor. It’s working great in a large typescript codebase and I’m completely used to it. Node & Chrome are my only outstanding RAM eaters.
Am I more productive now?
All of that to say: do I feel more productive after switching to vim? Short answer is: No.
Do I believe developers can be more productive just by using VIM? Maybe?!
I’ve seen super productive developers using VIM, and I met super productive developers using IDEs.
Keep in mind, Productivity is not tied to the IDE you use, neither your seniority.
Things like: Clear tasks requirements; Great communication skills; Solid knowledge of the core concepts of the language and framework you use take your productivity bar way higher than just using VIM.
But I have to say, coding using VIM is fun! Not using your mouse to scroll up and down or place the cursor is magical.
If you've got until this point, let me tell you what are my favorite and things I wish were better in VIM.
Favorite ones:
- VIM is lightweight! If VSCode or IDEs drive you nuts by eating up your RAM, give VIM a try.
- Installing and using plugins is super easy, check out vimplug.
- Creating shortcut for commands is straightforward and clean
- Macros are simply amazing. Record commands and replaying them is sweet.
- Navigate on your file tree with your keyboard and the same motion commands is amazing.
- Closing and reopening vim is fast. You can do that almost instantly.
- Switching to a new computer is as easy as installing VIM and place your dotfiles in the right place.
Things I wish were better in VIM:
- As I pointed out above, being super extensible is also a drawback. Basic things are not out of the box, for example: you need a plugin to navigate on your file tree in a decent way. VSCode and other IDEs have that for free. But in VIM, you’ve got to set it up yourself.
- The learning curve is high.
- It's a pain to do a simple Find & Replace in all files. Although there are a lot of great plugins, if I need to perform that task confidently, I open my project in VSCode and use it.
- As many things in VIM, autocomplete isn’t out of the box. You’ve got to set up LSP for the language you want to work on.
Conclusion
Give VIM a try, it may help you or not to be more productive, but I assure you the coding can be way more fun using it!
And if you're planning to fully switch to VIM, I highly recommend you to use tmux or any one similar.
Posted on December 8, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.