5 minute read

Vim? Sounds almost identical to vin, as in Vin Diesel.

Vin Diesel

But, alas, I am not referring to the hero of The Pacifier or the Fast and Furious franchise. Instead, I want to talk about Vim. Vim (Vi IMproved) is a super lightweight text editor. It is free and open-source. Sounds pretty great, right? So why is one of the most common Google questions related to Vim, “Why is Vim so complicated?”?

My Introduction to Vim

A brief personal history

I suppose my love affair with Vim requires a bit more personal background. When I started my freshman year at the University of Utah, I was fairly convinced I would become a sports scientist or a college basketball coach. As such, my classes were devoted to exercise science and biology. The only kind of “programming” I was interested in involved sets, reps, and mesocycles.

Weight Room

By the end of the year, however, one of my closest mentors had helped convince me to pursue medical school. Because I wanted to keep all future options open (in case I changed my mind again), I immediately decided I didn’t want to major in biology. I wanted more options from my undergraduate education than having to go to some form of graduate school. While I was pondering where I wanted my education to take me, my friend’s family embarked on creating a tech start-up. After talking to my friend’s brother (who had gone to an intensive summer code camp), I was sold on at least trying to learn to code. Who wouldn’t want to be able to create their own app? Between my summer physics classes and working out, I spent my time on codecademy and freeCodeCamp. Here, I learned some basic Javascript, HTML, and CSS. I figured these skills would be pretty useful, so I decided to go full-steam ahead and incorporate them into my education at Dixie State.

Get to the Point

Okay, okay, okay. This is really just a long-winded way for me to say that I knew absolutely nothing about programming (besides those online resources) when I started my programming classes. Sure, plenty of people in my classes were in the same boat, but at least their degrees required more CS classes which gave them a more thorough background. My bioinformatics degree seemed like a hodgepodge of CS, biology, and math classes. I got all the programming classes without any theory, background, or introduction to how code worked. I made it through like three classes where I was using the command line without even knowing what the command line was! So I just tried to copy and paste whatever my professor was doing. Which is how I came to Vim. Well, first I tried nano, but that was less intuitive to me, and I wasn’t sure why anyone would want to use the Ctrl button so often. So Vim it was.

Vim logo

Early stages with Vim

So I didn’t like nano. And I didn’t take any classes where the professor used Emacs. So I was stuck with Vim. One may ask why I didn’t just use an IDE such as PyCharm or Sublime. It’s because I didn’t know they existed! Well, actually, I did use IDLE, because it came with my installation of Python. But when I had to do work on a separately hosted server (You should’ve seen my professors when I tried to ask them what SSH was lol), I needed to use a text editor that was already there. Like Vim.

As already established, I used Vim simply because i liked :wq more than <Ctrl-X> or whatever nano uses to exit and because I needed a program already on the server. For two years, I used Vim about as naively as one could. If I wanted to type something, I pressed i (to go into Insert mode) and then whatever I wanted to type. I pressed Esc to stop typing. And I used my arrow keys to get anywhere. I’m not sure y’all understand just how slow of a process that is. I would spend MINUTES just scrolling to end of a line or to the bottom of a document. I was using Vim like this when I was doing an internship at STANFORD! I was like one of those people who buys a sports car and then procedes to drive it 10 mph under the speed limit!

Sports Car

Life as a Bioinformatics Technician

Because my plan is to become an MD/PhD physician-scientists, and basketball left essentially no time for me to do research during undergrad, I needed a full-time research position to beef up my research experience. In June 2019, I joined the Rothenfluh lab as a lab technician. Now that I was working in bioinformatics full-time, I decided to dedicate additional time to learning the tools of the trade. I followed a bunch of bioinformatics-related accounts on Twitter and realized I needed a complete overhaul on some of my practices which would include, of course, Vim. I discovered Vimtutor and…

MindBlown

Insight into my brain explosion

“Wait, I’m supposed to move with h, j, k, and l?!?!?” “OOOOH, so that’s how to use the different modes.” “I just press G and I’m at the bottom of the document? Or gg and I’m at the top??” “What kind of sorcery is this?!”

And so much more. I was astounded to realize just how capable Vim was!

Fin

I am incredibly glad I stuck with Vim for no apparent reason for two years. Yes, it seems complicate at first and unintuitive. But I feel the learning curve is only steep at the very beginning. This last year of using Vim had made it so worth it. I feel so free just using the keyboard. My workflow is honestly so much faster. There are so many other shortcuts and maneuvers that make Vim powerful. I’m sure they alxo exist in Emacs, but none of my professors used it so I wouldn’t know. This post isn’t meant to say Vim is the best text editor or all anyone ever needs. Just to share my journey with it so I can recommend it to others. Especially if you work remotely. It is so convenient to just be able to spin up Vim on my server and code there instead of transferring my code over my remote connection. This alone has made my time investment in Vim worth it.

I also have used Vim to edit my medical school application primary and secondary essays. My wife thinks it’s pretty weird I don’t use Word, but I’ve definitely never had the productivity in Word that I do in Vim. Plus, Vim is kind of like a game to me now. I’m always discovering quicker, more efficient ways to do things. There is even Vim Golf where you try to execute a task in the least number of keystrokes possible. Basically Vim is fun and punches above its weight. Kinda like Vin Diesel in The Pacifier.

Vin Diesel Pacifier

Stay tuned for more Vim posts as I learn more about its capabilities!

Categories:

Updated: