Neovim from a perspective


Tech

Being a CS student in India is… let’s settle on “difficult”. With the barrage of college curricula on top of ever-rising competition even for the slightest of advantages, one can lose sight of what matters. I surely did. Finding avenues of reflection in the monotony of assignments, tests and outdated curriculum is tough.
In my summer internship, I came across terminal based text editors with a partially complete idea. It was Nano of course. I accidentally also opened Vi too, after a Google search for “Quickly editing files on a remote server” was made. (Some keys were smashed, some AWS instances were stopped and rebooted 6 times. I digress.)
The twisted irony of fate was that I could not set up the application locally throughout my internship and I edited JS components on the server and pushed it to production right there. The “Real men test in prod” meme hit me like that acidic tang after you puke. That’s when I came across the Primeagen.


ThePrimeagen is an awesome Tech Twitch streamer and YouTuber with some interesting opinions, scorching hot takes and undoubtedly entertaining content. I saw his 5 Things I hate about Javascript in my summer break. Like the smooth-brained idiot I am, I said to myself “Yeah man, JS sucks!” Don’t get me wrong - JS is terrible. But blindly agreeing to what are indeed great takes is dumb. I didn’t think through it myself and was nowhere qualified to give an opinion on technologies when I couldn’t even get React to give me the proper state.
But this is in hindsight. Back after that video, I went through his description and reached his Twitch channel. And I’ve got to say it’s legendary. The man is filled to brim with hilarious takes mixed with the wisdom of a veteran. He frequently talks about Developer Experience, technologies like React, Rust, JS/TS, OCaml (didn’t even know what that was before) and most importantly - Vim/Neovim.


In his Why I use Vim in 2022 video, he speaks about the need for interest in CS. His From Meth to Netflix is especially beautiful. He recaps his whole journey and puts the love for CS in a perspective.
To summarize the Vim video, do Vim to learn what underlies the system you take for granted. The best example of this being the “autocomplete” in VS Code. It is NOT a feature that the all powerful VS Code is providing you. It is a Client program of the Language Server Protocol (LSP) that interacts with the Language Server. The server tracks the syntax, snippets and all variables you use, giving a UI where when you type, a pop up appears to show you, ‘hey do you mean this?’
So the question was - Do I love CS? Yes.
Do I want to learn the undergirds of CS? Hell yeah.
Let’s do this then! I got the Kali Linux WSL distro on my laptop, setup Vim and lo and behold! It sucked. Royally. Ended up uninstalling WSL entirely. I got a bad case of vimscript nausea and saw the video again.
Hey, it’s about understanding, I said to myself and part of understanding is being open. Don’t lose hope.
Apparently Vim is outdated. Neovim is the thing cool people are using. So let us take a deep breath and reinstall WSL, it’s update for Windows 11, then Kali Linux, then its tools. After getting a 100/100 on the CPU Usage twice, we have a Linux environment again. Insisting to do Neovim on Linux is another part where Prime influenced me. Because Windows is in the Crap Division of The Startup’s propaganda machine. And Neovim on Linux is actually nice, because of the affinity for terminal in Linux. Thereafter I followed ThePrimeagen’s Neovim setup and setup my own with Lua. I opened my internship project in Neovim. Go to definition? gd Fuzzy finding? Telescope to the rescue (By another legend - TJ Devries, one of the core maintainers of Neovim) And just about everything from the Vim motions to the plugins in Neovim was elegant. Remembering them all is a memory game but a kind of challenge I was excited to take on.


Fast forward to today and I use Neovim on Debian dual booted with Windows. In fact I wrote this blog as markdown in Neovim. It represents a kind of reprise for why I actually do want to write code, for fun and for a living. I have made myself familiar with so many new terms and concepts because of it - Metalanguages, Hypermedia as the engine of the state, Strongly typed - weakly typed systems, Performance conscious code (Casey Muratori’s a genius) and so on. Familiarity doesn’t mean understanding but it is a step in the right direction. And I am excited to go there. So just like Prime, I ask you to find something that makes you stop and take a good look. Neovim was for me what would be something different for you, maybe even something that is non technical. But find it to make good use of your time and that gets you excited.
Link to my Neovim Config on Github: nvim-config (Leave a star if you find it useful.)


Above opinions are mine and mine only. If you liked the above blog or have any constructive criticisms, hit me on X or the Contact Us link in menu.

© 2024 Manas Patil