bokwoon's personal blog
what are we, some kind of squid game?
← index
2024-10-27

An Ode To Vim

This website you see right now, as well as the CMS powering it, is all thanks to Vim. Not because I wrote it in Vim (which I did, in Neovim) but because coming into contact with Vim as a freshman likely kickstarted my programming career and gave me programming edge that I otherwise would not have leaving university.

I took my first computer science lesson (CS1010) back in 2016 at the National University of Singapore. The professor was teaching us how to write and compile a C program, and for some reason we had to use Vim.

I remember thinking it was archaic. You could only move around with arrow keys because the mouse didn’t work. There were a million commands to learn each which did their own little thing. I remember learning that "dd" deleted the current line. This software was obviously something that people only used in the past back when everything was more primitive.

Imagine my shock when, after class, I Googled about this outdated text editor and saw nothing but universal acclaim for Vim. Stack Overflow, blog posts, everything. It shifted my perspective 180° on this editor. I was delighted to find I could run it locally and quickly learnt that you could apply basic customizations to it so that it didn't look like a text editor from the 1990s.

A TANGENT: It is crucial that I was running macOS (then OS X). A Computer Science senior laughed when I said I was thinking of getting a Windows laptop for university because Windows supported more programs. He straight up told me that MacBooks were better for programming. I did not realize what he meant at first, but after getting my first MacBook and being exposed to the unix command line environment I finally understood. Thank you, Jeremiah. Your offhand remark likely changed my career, because without the MacBook I would have never used Vim locally (only through SSH-ing into the university's servers), and without Vim I would have never been exposed to the command line environment. I would have stayed a blind Windows user programming exclusively on Java IDEs and never "getting it".

From there I started using Vim for all my lab exercises, and it was through practicing Vim with these exercises that I found more inadequacies with my Vim setup and the config lines needed to remedy it. I did not read vimtutor. Nor did I do any "learn Vim now" exercises to build muscle memory of the shortcuts. I simply started with a basic set of shortcuts ("i" to enter insert mode, "esc" to enter normal mode, "hjkl" to move around) and layered on more as I encountered tedious and repetitive situations that I solved by Googling for and learning more about other vim shortcuts. I would recommend beginners learn Vim this way, instead of all at once.

Using Vim exposed me to the command line, and the command line exposed me to a whole host of other programmer-related things. I did not intend on learning shell scripting, but I picked that up by slow osmosis after reading about it a million times from vim-related stackoverflow answers and articles. I read about the grep command for two years without knowing what it did or how to use it before I finally tried it (for those who don't know, grep is like CTRL+F for lines of text). I never took a formal course on unix command line fundamentals, yet simply using Vim day-to-day was enough to make me learn everything I needed to know through effortless, natural progression.

So thanks, Vim

Without Vim I would have gone through the motions of a computer engineering student and graduated as someone with bad grades. With Vim I still left university as someone with bad grades, but with a passion for programming.

last modified 2024-10-27 19:40:52 +08:00