Reflecting on a decade of Vim
A few months ago Bram Moolenaar passed away. He is responsible for creating Vim, the text editor that I use on a daily basis. It's not just any editor, but one that I have absolutely loved since the first day I tried it. Having been a Vim user for many years, this unfortunate event seemed like a good moment to take a look back at my journey with this Vim.
Curious to know how long I have been using Vim, I searched the Git history of my Dotfiles repository to find out that the .vimrc
file was added on June 23, 2013.
Apparently I have been using Vim for over a decade now…
How did I get started?
I have always been the type of person who wants to use the best tools available, even if I am already using something that is good enough. After reading about this editor called Vim and how it allows you to edit text without having to use a mouse, I got very curious.
These days YouTube is full of video's demonstrating the possibilities of Vim or Neovim, but this wasn't exactly the case 10 years ago. However I do remember one video quite well, which is this one by Ben Orenstein: Write code faster: expert-level vim. I found it very impressive and after seeing it I was sold. Vim had to be my new text editor.
Learning how to use it
I remember quite well the resources that I used to learn Vim. I followed the Vim Tutor, which is an interactive tutorial that comes installed with Vim itself. It can be opened by running vimtutor
on the command line. This will only teach the absolute basics, but it's sufficient to be able to navigate, edit files and most importantly: exit Vim.
The next thing I did was print out a cheat sheet (This one) and have that next to my keyboard all the time. In the beginning I mainly used it to look up the basic things like navigating. Later I also went through every key on the sheet to learn what it can be used for until I had memorized everything. I think that was also the moment I felt confident enough to start using Vim as my main editor.
Another resource from which I learned a lot, was Vim Casts by Drew Neill. These were short videos, all focused on how to do a single thing with Vim. Especially the videos on how to use Fugitive, a Vim plugin for using Git, were very helpful.
Making the switch from Sublime
Before this I was using Sublime Text as my main editor. It's an amazing editor and like Vim quite fast as well. I don't recall having any complains about it at the time, but I quickly became so obsessed with learning Vim and using it that I replaced it with Vim as my main editor. This went pretty well for the first few weeks…
Until I got a new job.
Remembering all the key mappings appeared to be a lot more difficult when there's also the pressure of getting used to a new working environment. Even more so when a colleague is sitting next to me staring at my screen.
I decided it would be better to move back to Sublime Text and give Vim another try after I became completely accustomed to my new job.
Not long after that I discovered that Sublime Text had Vintage Mode. This allowed me to use Vim key bindings, while still being able to use all the features from a regular text editor. The best of both worlds. No more stress when I needed to copy and paste something while I was getting help from a colleague.
This transitional period must've taken around 3-6 months. I was using Sublime Text with Vintage Mode at work, while using Vim for everything in my own time. Working in Vintage Mode was quite enjoyable, but also limited compared to what Vim is capable of. I wanted to be able to use all the cool tricks I learned, use Vim plugins and use my own Vim configuration. Once I felt confident enough in both my Vim skills and my job, I decided to take the plunge. I left Sublime Text behind for good.
tmux
In the beginning I was mostly using MacVim, the GUI version of Vim. As I started doing more and more on the command line, I switched to using Vim in the terminal as well. While modern terminal emulators have support for tabs and split panes, using it always felt a bit clunky. That's when I discovered tmux. This is a terminal multiplexer that makes it possible to have multiple terminal sessions in a single screen.
With a few changes to my .vimrc
and .tmux.conf
, the combination of Vim and tmux worked seamlessly. Navigating between Vim buffers and the terminal sessions became effortless while only using the keyboard. I absolutely loved it, there is no way turning back now.
Using Vim on a daily basis
Vim is my preferred text editor whenever I need to write something on the computer. I use it for writing code, commit messages, notes, and of course for writing this blog. Even when I need to write text in a program that doesn't support Vim bindings, I often write it out in Vim and then copy and paste it into the other application, such as emails or lengthy WhatsApp or Slack messages. Now that I am so accustomed to the Vim key bindings, writing text without them feels unnatural.
These days I use Neovim, which is a fork of Vim that focuses on extensibility and usability. Most modern plugins are developed specifically for Neovim, so I decided to make the switch about three years ago. One of the biggest benefits is that Neovim has support for Lua, making customizing the editor much easier than with Vimscript.
The future
Even after 10 years it is a great pleasure to work with Vim everyday. The speed and ease at which I can edit text still feels like having super powers. The key bindings are so deeply engraved in my muscle memory, that it is hard to imagine ever using anything else. Whenever I need to write text somewhere that doesn't support Vim key bindings, I feel out of my element.
While I consider myself to be a very proficient Vim user, there is still a lot room for improvement. In both the way I use it to edit text, as well as in my configuration. This is also what makes it appealing to me: There is always something new to learn or something that could be optimized further. Using Vim never gets boring, even after a decade.
Thank you Bram for creating this fantastic piece of software 🙏