At the end of 2023, I decided to switch from VS Code to Neovim. I had been using VS Code for a few years and was getting a bit bored of it. I wanted to try something new and had heard a lot of good things about Neovim (mainly from ThePrimeagen, of course). I had also been using Vim keybindings in VS Code for a while and thought it would be cool to try out the real thing.
My Motivation
I didn't really have any issues with VS Code. I had just been watching Prime and thought it looked pretty fun, the way and speed he navigates through his code. I had used VS Code for many years, with occasional use of WebStorm and Rider from JetBrains, so I thought I'd open my mind and try something that seemed alien to me.
The Switch
I started by watching some videos on learning Vim and thought the best thing to do was to just use Vim motions inside VS Code. I did this for a week or two and became relatively good at using the basic motions. Once they became more natural, I really could see the benefit. At the very least, I'd recommend people learn the motions and just use them inside their preferred text editor.
I then decided to take the plunge and install Neovim. I installed it and started using it as my main text editor. I decided to just use a starter config (Kickstart) and then add to it as I went along. I started to add some plugins and configure them to my liking, but this wasn't plain sailing...
The Problems
I was really enjoying the process of tinkering with my config, but it wasn't as easy as just looking through the VS Code marketplace and installing a plugin. It took some conscious learning around my plugin manager Lazy and when something didn't work, it required reading docs 🫨 and working out what had gone wrong. This did add to the fun of it, but when I just wanted to get on with some work, it was a bit of a pain. Once you get your head around installing plugins, though, it is straightforward enough and can be just as quick as installing them on VS Code.
The Fun Begins
A week or two into using Neovim exclusively at work, my config was starting to get refined, and I was starting to remember more and more motions. Then the real fun started. I was flying between buffers, jumping lines, recording macros to do repetitive tasks—it felt awesome and very quick. Don't get me wrong, before I'd gotten the hang of it, it really wasn't efficient. I would be searching for the best way to do a simple task and Googling what certain keys did (I still do this). It's hard to explain to someone who has never used Neovim, but achieving a flow state when Neovim is your editor is much easier. I think because you have to have more intent with your work, you start thinking more about the problem and what code you actually want to write.
I find VS Code much harder to maintain that flow state. As soon as I have to think, "What's the keybinding for switching open tabs?" or use the cursor to navigate the file tree, the flow state breaks, and my focus is taken away from the problem for a split second. Before you say, "But Seb, you can configure VS Code keybinds," I know you can. I have tweaked some keybinds to suit, but it doesn't seem to lend itself nicely to it. There have been a few times where I've lost keybind settings randomly and not really sure why. I also have multiple accounts and machines I use to sign in to and use VS Code, where I have to manually port keybind changes to each account.
The Knock-On Effect
Because of this issue, I found myself not really liking the whole signing in to an editor and settings auto-syncing that much. It was nice sometimes to just log into an editor on a new device, and the editor would be the same as on your main machine. However, I found myself wanting to just pull my config from GitHub. This, in turn, led me to look into storing dotfiles on GitHub because it was just a pain having different configs on different machines.
Using Neovim also led me to start understanding my terminal better. It led me to learn a few more terminal commands and also understand the limitations terminals have when it comes to image and text rendering. I have tried a couple of terminal emulators on my travels, but I ended up sticking with Wezterm, and I would probably say this is my most used app on my computer, even when I am not maining Neovim.
It also made me want to never use a mouse, I saw the true speed in pretty much navigating everything via the keyboard. I now almost always switch apps, browser tabs and navigate my computer via the keyboard.
The Issues
I did have a few issues with Neovim; it wasn't all sunshine and rainbows. My first main hiccup that frustrated me was viewing images. I primarily work with front-end technologies, and my full-time job involves working with React Native to build mobile apps. Viewing images is kind of essential, and especially on a greenfield project, I will need to add images to the project and look at them quite a lot. I never really found a nice simple solution to this. I did try a couple of plugins, but it just felt like a janky experience trying to get it to work. Most of the time, I just opened "Finder" and dealt with the images in there (not very hacker man of me, I know 😢).
The second and most major issue came when I started working on a .NET project. It was a website that used .NET, and I found a couple of plugins to try and help work with it. It was mostly okay on the "back-end" side of things, but when it came to working with the Razor (cshtml) files, it was a bit of a nightmare. I found that Treesitter didn't work properly in these files, so I wouldn't get the syntax highlighting I wanted. Also, the LSP wouldn't work right, and I couldn't jump to definitions or anything like that. There may be a solution out there for it, but I just never really found one, so I mostly went back to using VS Code for that project and my work projects. However, I do find using VS Code much less fun than Neovim—it just feels a bit "soulless."
Summary
Do I think I was more productive using Neovim? Hmm, I personally think I felt more productive, and I definitely had more fun. I wasn't as productive during the initial phases of learning, though, and it does take a time investment to get your head around the new workflow.
Will I go back to using Neovim? Yes, I mean, I am using it to write this article now. I still use it for all my personal projects, and I still use it for my work projects that don't involve .NET. I think I will always have it installed on my machine, and I will always use it for something. I think I will be looking more into Zed over the next few months as that starts maturing, just to see if it can compete with VS Code for ease of use.
If you are on the fence about trying Neovim, I would say give it a go. It's a fun experience, and you may find you like it more than your current editor. I would say give it a good month or two before you decide if you like it or not; it does take a bit of time to get used to. At the very least, though, I'd say use a Vim plugin in your current editor and start learning the Vim motions because you really will start navigating through a file faster.
Thanks for reading! 🚀
Links
- Link to my Neovim Config, it's just a fork from Kickstart and isn't the prettiest but it does the job for me. If someone who is an expert in Neovim is reading this and has some tips for me, please let me know! I am always looking to improve my workflow (especially the .NET side of things).
- Feel free to get in touch with me if you've any thoughts on the article, Neovim or development in general!