DEV Community

Tom Deneire ⚡
Tom Deneire ⚡

Posted on • Originally published at tomdeneire.Medium

VSCode vs Neovim

Photo by [Christopher Robin Ebbinghaus](https://unsplash.com/@cebbinghaus?utm_source=medium&utm_medium=referral) on [Unsplash](https://unsplash.com?utm_source=medium&utm_medium=referral)
Photo by Christopher Robin Ebbinghaus on Unsplash

A while ago I wrote about the fact that I was using Vim motions in VSCode and that I was exploring Neovim.

Since then, I have really fallen in love with Neovim (although sometimes it was more of a love-hate relationship ;-) ) and I use it full-time now. In this post I want to explain why and critically compare my experiences with both tools.

(Before we start, just a quick word about Neovim vs Vim. I guess most of my observations will hold true for regular Vim as well, although there are some things that make Neovim a superior product, such as its builtin LSP (language server protocol) client, builtin terminal emulator, and embedding of the Lua programming language.)

Installation and setup

Proponents of VSCode will say that it’s much easier to install and setup, while proponents of Neovim will say that if you want to do VSCode right and if you know what you are doing in Neovim, there is really not much difference.

When I started with Neovim I was a complete newbie (still am, really), so I would have to agree that setting up Neovim is time-consuming and comes with a learning curve. LSP might be built in, but installing the language servers or getting autoformatting and autocompletion to work was not trivial. However, now that I’ve done it, it would be really easy to (re)do a vanilla install, because the setup is very portable. I’ve put my .dotfiles in a Git repository and that’s really all you need. Granted, VSCode does have a settings.json(which you can sync to GitHub, if I’m not mistaken), but it doesn’t hold nearly as much information as Neovim’s configuration files.

Performance / UX

As far as performance and user experience go, Neovim is the clear winner. It is really fast starting up, there is almost no lag, the application will not ask to you to reinstall plugins, and so on.

The editing itself also feels very snappy and responsive when typing or opening other files. Faster navigation between files and tabs is a clear win for me. Of course this partly due to the extensive use of mappings, but then again even with the best keybindings I don’t think you could get VSCode to do the same.

Extensions / plugins

There is no doubt that the VSCode/Typescript ecosystem for extensions is larger than the counterpart for (Neo)Vim/Vimscript/Lua plugins. One simple thing I miss, for instance, is a good (working) rainbow tags plugin. Another, more important perhaps, is Git integration, although to be fair, I haven’t explored the (Neo-)Vim options too much for that.

Moreover, VSCode, being Electron, i.e. browser software, can do things like Jupyter Notebooks, markdown rendering, which are perhaps not impossible in Neovim, but certainly more difficult to achieve. Of course, you ask the question whether you really want an editor to do that instead of using dedicated applications for that.

On the other hand, Neovim plugins are amazingly customizable. For instance, you can write Lua functions that have your statusline display exactly what you want it to say, or parametrize fuzzy file searching to your specific needs. This might seem like a small thing, but haven’t you ever wanted a certain extension to do you it slightly different so that it would be perfect for you?

Moreover, Neovim plugin development is much better than the VSCode counterpart, which involves installing a ton of software and a rather complicated build process.

Overall, Neovim is, as advertised, truly hyperextensible, it’s integrated Vimscript and Lua make it easy to get your editor to do more advanced things, like custom syntax colouring (at work, we work with quite a few bespoke filetypes), or just write a function to map a keystroke to an elaborate command or a Shell script.

Comfort

I first started using Vim motions because I was curious and because I have been struggling with a bad back and neck pain. Honestly, I didn’t think switching to Vim motions would have much of an impact, but in fact, I feel a clear difference. Of course, regular sittings breaks, good posture, and such are equally import, but I do feel that working with Vim motions is more ergonomic.

Aesthetics

This sort of depends on your personal preference, but to me, it’s a bit of a tie. You can make Neovim look really nice with patched fonts and it’s great you can git rid of all the clutter. On the other hand, you still feel in a terminal-based editor. (Which is not necessarily a bad thing). You can compare these two screenshots of the same file (with LSP diagnostics at work):

A Go file in my VSCode setup

The same Go file in my Neovim setup

Conclusion

So, is Neovim worth it?

If you’re trying to answer this question for yourself, I would recommend watching “Does your editor matter?” by Primeagen on YouTube. I agree 100% that the important things is getting to know your editor and maximizing its potential to help your development process. Whether its VSCode, Neovim or anything else, get to know your tool!

I personally wouldn’t recommend Neovim for a starting developer, but for me, at this stage of my software engineering career, it’s clearly a superior tool.

(Disclaimer: you might find Neovim addictive! I’m not kidding, for the first few weeks I was in a real frenzy trying to get everything working and then to customize it exactly to my liking!)


Hi! 👋 I’m Tom. I’m a software engineer, a technical writer and IT burnout coach. If you want to get in touch, check out https://tomdeneire.github.io

Top comments (0)