
Vim, released in 1991 is now almost 30 years old. But far from being outdated software, vim is more integral to the Linux experience than ever. Every person who has used, or still uses Linux is also a vim user, and at the very least, has used it to peer into configuration files, if not for programming, git integration, documentation, and scripting. But vim’s architecture, being what it is, has some limitations that are becoming more apparent. To address these faults, a new text editor – Neovim- was released in 2014 by Thiago de Arruda.
Let’s examine the differences between Neovim and Vim and consider whether switching text editors is worth the effort.
Synchronous vs Asynchronous Job Control
Vim is single-threaded. This means that when some job runs in the background, it causes the editor to freeze. When using vim as more than a simple text editor, there are any number of tasks that we might need to run in the background. For example, if you want to use vim to highlight the syntax of code, then you can’t use the editor at the same time.
If the operation can be executed quickly – as most operations are, then you probably won’t even notice the pause in the execution of the editor. But when the task is time-consuming – let’s say you’re running an external command, or processing a large file, then the pause in the editor can become a problem.
Neovim is designed to run background tasks and external processes asynchronously, which means that you can continue editing text, while these jobs execute in the background.
Language Server Protocols (LSP) Integration
When you’re coding in a language like say, Python, a good code editor will be constantly working in the background, taking care of numerous little details that make coding a smooth experience. For example, checking for syntax errors, autocompleting functions, navigating code, providing descriptions of functions, variables, and more.
Normally with vim, these features are available through plugins, but because of the single-threaded nature of vim, their operation will block the main code editor. For large files and projects, it can quickly become noticeable. Neovim, by contrast, delegates these tasks to external processes or servers called “Language Server Protocols” (LSPs). When you type a statement in Neovim, it will send your changes to an LSP in the background, which will process the text, suggest changes, etc, while at the same time, allowing you to continue with your editing.
This asynchronous processing of Neovim is probably the biggest change compared to vim, and has the biggest impact for regular users.
Problems with VimScript
VimScript is the scripting language used to extend the functionality of vim. We put it in the ~/..vimrc file. Here’s a simple example of using VimScript to generate line numbers in vim and setting the tab width:
" Enable line numbers
set number
" Set the tab width to 4 spaces
set tabstop=4
set shiftwidth=4
set expandtab
" Print a message in the command area
echo "Vim is ready!"
Pretty simple, right? Unfortunately, VimScript has had several criticisms directed towards it over the years.
Interpreted, Not Compiled
VimScript is interpreted, which means that the processor has to translate and execute the code line by line, which is slower. Neovim, on the other hand, uses a lightweight programming language called “lua”, which is compiled to bytecode instead of executed, improving its speed.
Readability Issues
VimScript can be unintuitive to program in, because of a redundancy in keywords. It uses statements like “let”, “if/endif”, and “set”, which sounds like a mix of multiple different languages and can feel verbose.
Lua, on the other hand, has a more modern syntax. As an example, here’s how lua would enable line numbers:
vim.o.number = true
Honestly, the matter of the “readability” of lua is open to interpretation. Those who first created VimScript thought it was perfectly readable. However the developments in programming consensus over the last 30 years have led us to expect code to be written in a certain way, and statements like “endif” are now considered outdated. There isn’t an objective standard, here. With its object-oriented structure and other modern programming syntaxes, lua is more familiar to those who already have exposure to the way languages are written today.
Lua has some objective improvements, however, such as better error handling and modularity. Plus lua is also used outside VimScript in various game engines and embedded systems because it’s lightweight and fast. As a result, it’s more familiar than VimScript to many developers who have worked on projects with lua.
Installing Neovim
You can install Neovim on Linux just like any other package.
For Debian systems:
sudo apt install neovim
for Fedora systems like CentOS:
sudo dnf install neovim
To start neovim, type:
nvim filename.txt
You can even install neovim on Windows and Mac. So compared to vim, it’s a more universal text editor.
Compatibility with Vim
Neovim is designed to be fully compatible with vim. This means that you can reuse all the shortcuts that your fingers have gotten used to over the years. Neovim functions in the same way as vim, where you can enter “insert” mode by pressing “i”, open a new line below the current one, and start typing with “o”, etc. Similarly, you can enter command mode with a colon (:), and commands like save and quit (“w” and “q”) work as before.
So if you’re used to vim and are thinking of giving neovim a try, there’s no harm in installing it and using it. You’ll be able to work with vim just as you were before with any problems.
Neovim has a Steep Learning Curve
While you can continue to use Neovim without changing the way you use vim, you won’t see any difference unless you start using it for more advanced functionality like creating configuration files, using plugins, syntax highlighting, floating windows, git integration, etc.
The problem is that many of these features require you to put in a lot of up-front effort to squeeze the benefits out of neovim. Much of this comes down to learning the new configuration language – lua. Even if you’re an advanced user of vim, mastering neovim requires you to learn lua and achieve the same level of comfort with it that you had with Vimscript. This can be a tall order if you don’t see any immediate benefits of switching to neovim.
Setting up Language Server Protocols (LSPs) can turbocharge your coding in neovim with IDE features like autocomplete and diagnostics. But it means you have to learn the architecture, the language (lua), and more.
Is it Worth it?
Honestly, if you’ve been using vim like I have – just for opening text files, making a few changes, and then exiting, you don’t need to switch to neovim. I’m betting that this covers the vast majority of users who operate vim right now. Moving to neovim only makes sense if you’re hungry to squeeze more out of Linux’s text editor than what you’re getting now. If you use it a lot of coding, then I think it’s worth putting in the energy to learn lua and about how LSPs work.
Conclusion
Neovim is a drop-in replacement for vim that gives you added features if you want them. As a result, there’s no harm for existing vim users to try it out. But to get the most from neovim, you’ll need to learn new workflows and a new language – lua – which might be too much for most.

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!
Leave a Reply