Note that this is a story post rather than a quick technical.
I still recall the first programming exam I did without using a mouse. Launching a spanking new terminal, typing
vim, I was sold by the efficacy of the keyboard and the mighty editor Vim. There was some debate on whether I should use Emacs but just as I searched on Google
emacs to lookup its website link, right now as I’m writing, I got this glorious result:
As entertaining as that is, the reason I picked up Vim was thanks to one of the lecturers using it with blazing fast speeds. I really liked how quick things were moving around, cursor jumping here and here. And then nothing would happen on screen, one would hit several keys and suddenly all the code would fall in line. To be clear, I took that screenshot with incognito mode in case my search results are biased towards Vim. I also left it at the original resolution so you can enjoy it without a blurry image compression.
Let me be clear, I coded with Vim through a simple SSH connection quite happily for many years. I coded while I was at the hospital after my father’s surgery; I fixed experiment names while hiking in the forest through a 4G connection on my phone. For all that, I am grateful. But as the projects I work on got bigger and more complicated, I’ve noticed my brain had to keep track of files, function names, definitions, control flow and even stack trace to navigate that project. I felt exhausted and needed some extra help. Vim did offer help with many extensions, from file navigation, fuzzy search to auto-completion. But every time I needed to change a shortcut, adjust an extension it was definite trip to StackOverflow. How do you overwrite a key bindings in Vim? How do you enable spell checker in Vim? What was the shortcut for enabling that? Simply put, I started memorising this extensive collection of keyboard shortcuts.
As other things in life started to tire me, I couldn’t take on Vim any more.
Sneakily, VS Code was waiting in the background for my inevitable demise. Having a Windows laptop, I was naturally inclined to try it. You might gasp and think I develop on a Windows machine, you are
wrong, I use the remote development extensions to SSH or develop inside a container. After reading through some documentation, I was able to get up and running. For the first time in over a decade I was able to click on the screen! Yeah, I know, such enthusiasm melts through steel.
But I took the Vim keymap with me. Years of muscle memory, one cannot get rid of.
With the Vim keymap and remote extensions, VS Code struck a nice balance between using the keyboard and making things such as customisation easy. I dare say, I clicked on a button with the
otherwise useless touch screen of the laptop the other day, but that is a conversation for another time. I don’t mind the somewhat slowness of launching a VS Code workspace. To be honest, after installing some extensions for Vim, it started to lag as well. Am I massively blown away by VS Code? No, not really but I can’t fault it either. It works, it’s simpler and helps ease my brain.
I still keep Vim in my toolbox as an ubiquitous terminal based editor.
Removed all the extensions, brought Vim back to it’s element: a fast terminal based editor. I still use Vim when I deal with remote servers or a quick edit here and there. I would strongly recommend you have a terminal based editor under your belt too. It does not have to be Vim, any editor like nano would do. I learned to not take a screen or a terminal for granted and use both for what they are best at.
So in summary, learn to navigate and develop in the terminal before using GUI based tools. This was certainly the case with my journey and I can’t for certain rule out my return to the full terminal life of things. But a balance in between saves me from memorising those keyboard shortcuts I used to desperately cry out for in the middle of a coding session.