A Boot Camp Grad takes on Neovim

by Kyle Kettler

The first time I saw someone writing code, was on my college roommate on his MacBook Pro in 2012. He was using Coda, a MacOS-only web-focused editor. At the time I knew nothing about coding, but I was mesmerized watching him write the lines of code that became a website before my eyes. It would be a long time before I was that excited by seeing someone traverse text, but we’ll get to that shortly.

See, I’ve been interested in programming since I was a kid, but was always intimidated by it and figured it was too complicated for me to learn. So I never took my exploration seriously.

Fast forward to 2019 when I first attempted to learn JavaScript. Being the noob that I was, I heard VS Code was the best editor to use and didn’t even question it. I just installed it on my MacBook then proceeded to spend hours finding the right color theme, installing the “best” plugins, and learning how to edit my settings.json file. I didn’t even know what JSON was at the time, but I figured out that by changing some values in that file I could make the embedded terminal use a different theme from the rest of the app. That little bit of customization made me feel cool and made me feel like a “coder”. But let’s be real, most of the “code” I was writing at this time was in the online editor of codeacademy.com. Even so, this was the beginning of my love for tinkering.

Fast forward again to late 2023. This was the year I decided I was going to leave my decade-long career in design and finally make the jump into the world of programming through a boot camp. Around this time, I found The Primeagen and TJ DeVries on YouTube and was introduced to Neovim. Not having a CS background, I had never even heard of Vim, but after seeing the Primeagen flying through files and editing them with violence, speed, and momentum, I knew, I had to learn Vim.

For anyone unaware of what Vim is, like I was, it is a modal-based text editor that runs in the terminal and it is built into most Unix-based systems. Modal in this instance means that there are different modes for interacting with the text, “normal” for traversing files, “visual” for selecting, and “insert” for changing text. Neovim is a modern fork of Vim that is more extensible and has a very active development community.

I was ready to jump into learning Vim, however, my boot camp required us to use their custom VS Code instance, running in a Docker container. So, I installed the Vim plugin and slowly began picking up the basic Vim motions, but Neovim had to wait.

A few months after graduating, I decided it was time to leave VS Code behind for the greener Vim pastures. I installed Neovim and the LazyVim distro by blinding copy and pasting commands into my terminal hoping they worked. I chose LazyVim because it seemed like the easiest distro to get up and running. Plus, it had a lot of things I had grown accustomed to in VS Code like a file explorer and tabs. Yet, even with those comforting features, I’d be lying if I said I wasn’t completely overwhelmed at this point. I was constantly pressing the wrong key combinations, causing some plugin, that I had no idea was even installed, to open and not knowing anyway out other than :qa and restarting Neovim, hoping I hadn’t broken anything while I was fumbling around.

This went on for a few weeks; my ability to be productive had plummeted. Thankfully, I still hadn’t landed a job yet, so I didn’t have to worry about being slow, but I’d be lying if said I didn’t go back to the comfort of VS Code often just to be able to get some code written without the struggle. But that is when things began to click and the vim key bindings slowly began to stick in my brain. VS Code started to be a place of discomfort. Whenever I opened it up, I would get frustrated and want to be working from my terminal. At this point, there was no going back.

So, I took what I determined to be the only next logical step in this journey.

rm -rf ./config/nvim

LazyVim was great, but I wanted my Neovim to be exactly what I wanted it to be, with only the plugins I used installed. The best way to get that would be to start from zero and build my config exactly how I wanted it. Thankfully, when I decided to do this I came across TypeCraft and Dillon Mullroy on YouTube. They both have excellent videos on their custom Neovim configs and I would have struggled a lot more without them, so huge thanks to them!

After a few days of setup, my config was in a spot I was happy with it and could be productive. There was a lot of frustration early on, but once I understood the patterns of how to install plugins, everything was pretty straightforward. The most difficult part was getting auto-complete working properly (to be honest, I still don’t have this working exactly how I want it, but it is good enough for now). Perhaps in the future, I’ll do a write-up on some of my favorite plugins.

My config continues to evolve as I learn more about Neovim and I can do more interesting things with my setup. For instance, I recently added some custom Treesitter queries to improve the syntax highlighting on .mdx files. And I know I am still just scratching the surface of what is possible in Neovim. You can see my Neovim config and the dotfiles for my other primary tools on my GitHub. Below is a screenshot of my current config with a TypeScript file open.

My Neovim config with a TypeScript file open

At this point, Neovim has been my only code editor for the better part of a year. The basic motions feel completely natural and I am slowly learning more and more complex motions. I may not have the speed and momentum of the Primeagen, but I am far faster and more productive than I ever was in VS Code. I am now a Vim user through and through, even if I don’t use Neovim for the rest of my career. I am certain I will always use Vim motions.

If any of you are still reading this and you don’t have any experience with Vim, I would suggest giving it a try. Start with Vim motions in your editor of choice (basically every editor has a Vim mode of some kind) and then once you are comfortable with navigating and editing text, consider working directly from the terminal. I am convinced that moving to a terminal-based workflow will end up being the best decision of my development career.

Working from the terminal hasn’t inherently made me a better programmer, but it did open my eyes to the larger world of computer science that I didn’t get exposed to through my boot camp. Nothing against my boot camp, it taught me how to be a productive TypeScript developer in a short amount of time, but I wanted to go deeper. The people I learned how to use Neovim from have opened my eyes to things like compilers and compiled languages, functional programming, and low-level programming. Even though I still primarily work in the JavaScript ecosystem, this journey has started to break me out of the JavaScript-only world that is common to end up in post-boot camp.