Can’t decide whether to use Vim or NeoVim as your text editor? Curious about the subtle differences between the two? Then this comparison article will help you decide which one is best for you.
Vim and NeoVim are both powerful text editing tools excelling in different ways. When people come to Linux for the first time, they get confused about which one to get. Even veteran Vim users often can’t decide whether to make the leap and start using NeoVim.
Hence, this guild will help you determine the NeoVim vs Vim – the most suitable editor based on your needs. We will compare both software and show their pros and cons.
Let’s get started!
Brief Overview of NeoVim vs Vim
Vim (Vi Improved) is a text editor included in most Unix systems. It’s widely used by programmers, developers, and Linux administrators. This command-line-based editor is highly configurable and customizable.
Vim’s large community of users has created various plug-ins, scripts, and macros to extend its functionality. It has a steep learning curve, but once mastered, it can be very powerful and efficient for editing code and text files. Some of its key features include syntax highlighting, code completion, and a wide range of commands for manipulating text.
NeoVim is a fork of the Vim text editor that replicates all the good aspects of the original Vim and adds to it. In 2014, a group of developers decided to take Vim in a new direction. Focusing on performance, extensibility, and usability. And that’s how NeoVim was born.
NeoVim maintains backward compatibility with Vim. As a result, most scripts, plugins, and configurations of Vim should also work with it without modification.
It is popular among many developers. Especially those who are looking for a more modern, feature-rich, and faster alternative to Vim will admire it.
Vim usually comes installed by default in many Linux systems. In case you don’t have it, install it with these commands:
# For Debian-based OS $ sudo apt-get update $ sudo apt-get install vim # For RPM-based OS $ su - $ yum install vim
To install and run NeoVim, issue the following commands:
$ curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage $ chmod u+x nvim.appimage $ ./nvim.appimage
Since this is an AppImage, it will run on most Linux machines.
Key Differences Between Vim and NeoVim
Before we go deep into both software, let’s quickly look at their main differences. This will also give you ideas about what NeoVim does differently than Vim.
|Point of Difference||Vim||NeoVim|
|Installation||Pre-installed in most Unix systems||Must be installed manually|
|Portability||Very portable||Less portable|
|Extensibility||Not very extensible||Highly extensible|
|LSP Support||No built-in support||Built-in support|
|Speed||Slower in comparison||Very fast because oflibuv|
|Directory Structure||~/.vim directory||XDG Base directory|
|Lua Support||Uses Vimscript||Native Lua support|
Features and Capabilities
A detailed comparison of the features and capabilities of NeoVim and Vim
Examples of how these features can be used in real-world scenarios
And now, for the most important part of this article—feature comparison. Let’s see how each competes against the other in different sections.
Performance and Efficiency
NeoVim performs better than Vim out of the box due to a better configuration system, robust API, and plugin architecture.
Unlike Vim, you don’t need to set many changes before using it. The default settings that come with NeoVim are already well done, so you can get to work the very moment you install it.
Vim uses Vimscript as the default for writing scripts. In NeoVim, you also have Lua natively. Hence, creating scripts and configuration files is much easier. Vimscript is much slower than Lua and primarily useless outside of Vim. Lua also lets you use amazing plugins like Telescope on NeoVim.
NeoVim benefits from the libuv library that ensures a small codebase. It enables asynchronous I/O operations, meaning the main thread won’t be blocked when performing multiple operations.
So you can understand that NeoVim has a better edge than Vim in performance. Because of so many extra added features and changes, NeoVim
One of the main goals of NeoVim developers was to make it much more extensible than the original Vim. And they have succeeded in that.
When Vim was created, there wasn’t much scope to make it extensible. For many years, Vim users didn’t have the freedom to take Vim to its limits. But then the dev community came up with NeoVim to overcome this. You have much more flexibility to extend NeoVim.
With remote plugins support, you can use any programming language to add to NeoVim, without compromising the tool itself.
Unlike Vim, NeoVim doesn’t need to support lots of widget toolkits for GUI interfaces. Instead, it implements GUI through external clients thanks to msgpack-rpc API.
It would be a crime not to compare both per LSP support. This is one of the top-notch features NeoVim received.
Language Server Protocol (LSP for short) allows text editors and other development tools to provide enhanced support for various programming languages. This happens when a separate program called a “language server” handles language-specific tasks such as code completion, syntax highlighting, and error checking. Meanwhile, the text editor handles the user interface and other general tasks.
Though Vim supports LSP, it is only through plugins. So you need to install and configure extra resources to get it. On top of that, many users report that Vim’s LSP support is unstable. Another drawback is that Vim doesn’t have Treesitter support.
NeoVim, on the other hand, has built-in LSP support and also Treesitter support. This makes it a better code editor than Vim. You also get IDE vibes from it.
Community and Support
Both Vim and NeoVim are free and open-source projects. However, Vim, although it has a developer community, much of the development decisions come from Bram Moolenaar, the original author of Vim. NeoVim, on the other side, is entirely community driven. That’s why you can find many “most wanted” but never granted Vim features in Neovim.
Vim has matured really well, while NeoVim still has a long way to go. Both tools have great support online, but Vim easily has the upper hand here.
With greatly documented official tutorials, the text guides on blogs and video guides on Youtube, and a subreddit with over 150k members, you can get started pretty easily with Vim. NeoVim also has many tutorials, but not as many as Vim does. With only about 50k subreddit members, the community is still smaller for NeoVim. This means you can’t get support for your NeoVim questions as easily and quickly as you could get for Vim.
So then, after this whole discussion, you should have a clear idea about which text editor to go with. You’re right if you think this article was biased toward NeoVim. As more game-changing updates are released, NeoVim is setting itself apart from Vim more and more.
If you’re a power Vim user comfortable with it and the major differences aren’t relevant, you can keep at it. The same goes for people who must switch devices and do SSH often. This is because Vim is installed by default and you don’t need to set up the environment on each device.
On the other hand, if you’re a new user or you’ve been waiting for Vim to implement your favorite features, but NeoVim implemented them instead, we don’t see any reason not to switch to NeoVim. It has everything Vim offers but does a better job at it.
But the real objective way to determine the better tool is to use both yourself. Learn the tools, get used to them, see what you like about each, then stick with one.
So, which one is your favorite text editor? Let us know in the comments below.