Oh no, not another Vim article!
No I don’t use Emacs and no, I don’t hate Vim. This title is purposefully crafted to invoke some sort of emotion in order to convey what I think is an important message. I’ve been using Vim for around 7 years, and I still use it now. It’s true, whether you like it or not, Vim can be harmful in certain situations. There’s no denying that Vim is a power tool, and as with any power tool, it commands respect.
You can use a chainsaw to cut down a tree but if the only thing you are used to is a manual saw, you will probably try cut down the tree without activating the blade.
While you may feel like you are being productive, the fact is that you are wasting your time.
I weirdly fell in love with the process of creating code
When I was studying, some of my first programming was done in Actionscript on Windows PCs. My teammate was fast when it came to typing, and modifying the code. He used Alt-Tab to switch between programs and I watched him in awe. He had no need to reach for the mouse. I tried to emulate him, and I would switch between programs quickly using Alt-Tab, to the point where I started developing RSI. I enjoyed the process creating the code, and noticed that everyone has a unique style. I became obsessed with the process and lost focus on what actually matters. Getting things done.
I tried to convert everyone in my company to use Vim
The first time I heard of Vim, I couldn’t understand what all the hype was about.
As with so many things, after you hear about it for the first time, it seems to just pop up everywhere. I heard that only the best programmers could use Vim and that you could be so much faster in it, ultimately making you a better programmer. This felt like a natural progression from my Alt-Tab shortcuts, and I could have it all.
My mind was made up. I decided to convert to Vim from GEdit. I would not shut up about it. I was very annoying.
I was slow
My obsession with a customised development environment grew to the point where I was typing on a loud mechanical keyboard, in Colemak, on Arch Linux with Xmonad and no real graphical interface. To interact with the database, I would do it in a Vim buffer, obviously.
Half the applications on my computer didn’t work correctly and I refused to use anything that wasn’t on the command line. My obsession with tools and tinkering had spun out of control. I was becoming frustrated. Not to say that this development environment was wrong, but I didn’t put in enough work to be proficient in it.
Which is what this all boils down to.
How many balls can you really juggle at once?
If you haven’t seen Rich Hickey’s talk titled Simple Made Easy, I would highly recommend that you watch it.
In it he talks about the mental capacity that programmers have to solve complex problems. He compares it to juggling balls, where even the best juggler can only handle a certain amount before it becomes impossible. With poorly designed programs, you might end up with a few balls unrelated to the problem that you are trying to solve. You end up having to keep unimportant things in your head, robbing you of your capacity to think clearly about the actual problem you are trying to solve. Vim could end up throwing even more balls into the mix. Many more.
With a maximum of 8 mental juggling balls available, Vim could end up using 5, 6 or 7 of them. What’s worse is that you may be oblivious to the fact that this is even happening. I’ve seen new programmers excited about using Vim, so enthusiastic, only to forget what method signature they were updating because their entire thought process suddenly became dedicated to figuring how to modify the text up until the 3rd t character.
You have successfully robbed yourself of your ability to think.
Typing isn’t the bottleneck
Typing isn’t the bottleneck but you surely have the option to make it the bottleneck. Having to think about what and how to type will drain your energy. It is counterproductive. EVERYTHING I do in Vim now is in my muscle memory. If I learn something new, usually by practicing with Vimgolf, I make a point of understanding and committing this new key combination to muscle memory.
Once it’s in your fingers, there is no need to actively think about it.
Pragmatism is stylish
I hate the word pragmatism. I’ve heard it thrown around so many times and truly it’s quite soggy.
However, when I see someone approach a problem with their entire cognitive ability dedicated to it with no distractions, I feel that same feeling that I used to feel when I saw people type fast or use a lot of shortcuts. Given a problem, the way you approach a spike to get a result as quickly as possible can save you a lot of time moving forward.
You have become a power tool.
What now?
Unfortunately Vim is not a text editor that you can have a part time relationship with. It’s all or nothing. If you believe that using the arrow keys or mouse is wrong and this adds mental overhead, then what’s the point? Should you stop using Vim? Should you surrender and follow the path of least resistance? Most certainly not. That’s not the point I’m trying to make here. When adopting this text editor, you need to accept the fact that you are required to put in your 10,000 hours. Figuratively speaking of course.
If it’s not in your muscle memory, it’s not worth using it.
Practice using Vimgolf, watch Vimcasts and read the built in documentation. There is a fine line between Vim being your ally or your enemy, silently draining your energy and making you worse off than if you were using a simpler text editor.