Gone with the wind πŸŒ¬οΈπŸƒ
Published on

Why I switched to Neovim and never looked back

The problem at hand

Leaving VSCode, probably the most user friendly code editor I ever ran Hello, world! in, was the biggest change I made this year.

It definitely wasn't the FOMO on trendy code editors like Zed or Neovim but an urgent need to achieve the same productivity (or even better) with lighter tools.

I could run VSCode with no lag at all but the storage on my Acer Chromebook Spin 513 was a limiting factor.

With only 27GB to house my VM, I have to be really strict about disk usage and using VSCode was not a good idea because it tends to take a lot of space even before you start installing your favourite plugins.

That's when Neovim came in, I had zero experience with modal editors and just thought of them as being a big fuss. I mean, why use anything else when there's VSCode ?

Now that I reflect on this resistance to change , I think that's something that I may have to expect as a programmer, that stuff will always change whether it's deprecations or updates to the tools I use. I didn't have to be attached to any setup/tool.

Other than storage limitations, ChromeOS is still ironing out some hiccups in using GPU acceleration. I remember how VSCode used to cease up randomly when I launched it without passing the --disable-gpu flag. Of course you can turn it off in Settings to make sure it launches that way by default but that's besides the point.

The solution to my problem had its own problems

The other issue I had was that even if I installed Neovim I couldn't run it directly in the default terminal shipped with ChromeOS (as of the time of writing, some fonts are not supported).

I tried out most of the popular ones out there, Warp, Alacritty and kitty just to name a few. I ended up settling for Ghostty because it was easy to configure and had a lot of configurable options.

If you want it so bad, build it from source

I'm on Debian and the apt package manager keeps a binary of Neovim that's a few versions behind. How convenient! An outdated version is just what I needed! (sarcasm). This meant that after cloning the LazyVim configuration, I was unable to load it beccause it required a version higher than the one distributed on apt. But seriously though, why does apt keep outdated versions of apps ? πŸ‘€

And what's more, there's no prebuilt binary for Linux ARM64 so getting the latest release on GitHub was a non starter. The only other alternative was to run the AppImage variant, and I hate AppImages just because updating them is a manual process and having to create the desktop manifest file....too tedious.

Why is everything (okay, most things) difficult on ARM64 ? This isn't the last time I've had to build something from source.

Was it worth all that hassle ?

Long story short, I obviously saved a lot of diskspace by using it and frankly speaking it has significantly improved how I navigate my code (fuzzy finders are amazing) and the fact that the same action can have alternative keymaps makes it easy to learn the keybindings by heart.

The only thing that took me a while to get used to was Vim motions which seem quite ancient if you're used to standard Ctrl + C & Ctrl + V for copying and pasting. Nope we don't do that here in Vimland. There's no copying, only yanking.

I still find it a bit awkward switching between modes for actions like selecting text or copying/pasting

I still miss VSCode...sometimes

I admit that reaching my full productivity in Neovim, is going to take a minute because I used VSCode for 4 years and honestly I didn't know any other way to do things.

Obviously, nvim makes it ridiculously easy to find what you're looking for using fuzzy finders like telescope that allow you to search through document symbols, files and more.

The configuring part is a bit tricky though. You configure Neovim using Lua, a programming language in itself as opposed to VSCode's JSON based configuration which has rich autocompletion. This is the part you get to choose between configuration flexibility (Lua) or simplicity (JSON).

I have plans to write my own onfiguration using kickstart.nvim as a template, which basically gives you the bare minimum to get you started unlike Neovim distributions such as LazyVim or AstroVim which are highly opinionated and configuring them is less flexible. But at the moment, I'm satisfied with my current setup.

If it ain't broke, don't fix it

As an added bonus, I like the idea of version controlling my configuration by pushing it to GitHub. Setting up on another machine is as simple as cloning the repo and running nvim . Effortless

Another benefit of Neovim is that it has less bloat from extensions that have stopped being maintained yet are still listed in the Marketplace. Neovim has fewer plugins to choose from but they get the job done. Besides, having too many options is overwhelming sometimes. You don't agree ? Try picking a ReactJS framework for building your next web app.

I feel more open sourcey now

I really appreciate all the effort that goes into making OSS work smoothly. Most of the contributors do it with no compensation at all except for the gratification of download counts and project stargazers on their repositories. Using this awesome software is the best way to show my appreciation.

Takeaway

Other than that, nobody really cares except yourself about your tools preference. What's really important is getting whatever you're building out there to the end users (who usually have no idea about the development process and don't care either way).

But Vim based editors are really fun and have more to offer if you're willing to lose your productivity for a while before mastering them.