Getting Vim-brained -- How using Vim has changed my life
Sometimes people get anxiety when opening their code editor (although, I suppose people are just getting more anxious in general) like VS Code. I suppose the editor program startup delay would be worse if you’re opening Visual Studio or Intellij IDEA as they index your project or do other stuff that I don’t know about, giving it a lot of functionalities and features that you may or may not even use. I started off in VSCode like many others who would start learning how to code with the belief that this would be a valued skill that would make them money and find happiness in life :). Anyways, VSCode obviously didn’t bring enough happiness. If it did, I wouldn’t be writing this blog post trying to convince you, the reader, to give either Neovim or Emacs a try! I’ve never used Emacs, but I hear if you want to avoid the “Emacs pinky” you should just remap your Caps Lock key to Ctrl because who even needs caps lock there…Anyways, I’ll give some context about how I found my way into Vim/Neovim and how it has changed my life…If you don’t care about trying alternative text editors or think my writing sucks, don’t keep reading.
What is Vim? Vim is a text editing program that has different modes of operation that lets you move around text acrobatically, run commands standalone or in combination with motion keys, create and run custom macros, etc. It’s just a different way to edit text than regular text editors. I was first introduced to the Vim editor from watching a YouTube video from William Lin, from who I was introduced the idea of competitive programming or “just a bunch of nerds solving programming puzzles as fast as they can.” Pretty sweaty nerd shit. Anyways, I installed Vim and tried learning the basic level motions and commands that you would use all the time. I was a lot more impressionable at the time, and I wanted to learn more about programming and be prepared and be cool and escape from the real world…; this was in preparation for college and my first ever regular computer science class in college (which would be a huge let down, but that’s why you have the internet). So let’s try using what the cool kids are using, Vim. And yes, the answer is yes. It does feel as cool as it is to watch someone smash out a vim combo. At the very least, I would tell absolute beginners to learn the motions! They can bring you a long way and oftentimes you can get the motions in other modern and popular IDEs. They also show up in unexpected places, imo. For example, I recently switched from my set of messy custom-interlinked Google Docs for notes for everything to Obsidian as my notes for everything, and I found out it had a setting to enable Vim motions for editing! Also, you can install a Vimium Chrome Extension for using Vim motions to control how you navigate websites in your browser. This is a nice way to “waste time” while learning how to navigate websites with only the keyboard!
Anyways, back to the past when I was more beginner to Vim, whenever I would need to do “real work”, I realized I didn’t know enough Vim to jump between multiple files as normal projects would likely require, so I just used VSCode. “It just worked.” Later on I would learn about the Vim extension in VSCode and thought I had gotten the best of both worlds! That helped me to continue using Vim motions, and it was good for a long time. Fast forward a bit, I stole some dotfiles from MelkeyDev for VSCode and modified those to my needs to for more keyboard-centric actions. It seemed like why would I ever use regular Vim in a terminal again?
I suppose for myself I just couldn’t help but be drawn to the appeal of using a terminal-based editor where you have to know all these esoteric keyboard shortcuts and configurations to in order to get actual work done. It wasn’t sunk cost fallacy, it was just fun to me. At the same time, I was definitely being introduced into a cult by online creators and big time Neovim-shills like theprimeagen and tj devries. So, more recently I’ve weaned off of VSCode and am spending more time in Neovim (fork of Vim, quite popular now, some say it’s the golden age of neovim), thanks to a personal configuration starterpack like kickstarter.nvim, I was able to have an easier time understanding how writing a vim configuration with Lua actually works and how to modify it to my own needs and install further plugins from the amazing open source community of “vimmers”. I’ll consider myself a “vimmer” when I make a contribution to a project…lol. But really though I love using Neovim to read, edit, and write code. And maybe you’ll enjoy it too. The hard work of spinning your creative wheels, thinking, creating, and solving problems happens independently of your text editor, but I swear I think better not having to see VSCode on my screen.
One thing I haven’t dug into with Vim is debugging, it can be done from what I know but you probably need more configuration in order to get to a point where you would be out of the box in IDEs like Visual Studio (kickstarter.nvim has a provided plugin for this for Go at least). Anyways, as a not-good-enough-to-program-professionally-and-unemployed guy, what do I know about your debugging of large C++ applications or whatever it is you do. Maybe you’re like John Carmack and love and already actively step through a debugger all the time.
You can make Neovim into your “Personal Development Environment” or PDE but it probably shouldn’t replace your tried and true IDE that you use professionally (at least at first ;)). I would recommend someone who reads, writes, and edits code a lot to consider giving either Vim/Emacs a good chance if they have the time to try to see if it makes them enjoy their work more by making the smaller, monotonous things better. I think it’s the same thing for like obsessing over what kind of computer keyboard you use. Maybe you really like the feel of Blue mechanical switch over Browns but you can’t because they’re too noisy for your workspace! Take back some control and agency with Vim! xD Some (rich) people just can’t go back after trying a Moonlander. Maybe give even a cheap split keyboard a shot…You don’t know what you like or don’t like, or what might or might not give you a 10x in productivity (actuallly its just 10x in feeling cool), unless you try different options!