I have been using vim for a few months and I am wondering if I should switch to neovim. Currently I am using no plugins, and only a few basic mappings.I use vim both for quick edits of config files and for writing python. I have heard that it is the future of vim. I would like to know what the major differences are between the 2 editors and what I would have to learn/unlearn to switch to neovim.
I have heard that it is the future of vim.
That's not true. Or, at least, no one knows if it's true or not.
Neovim is a fork. It still shares much (and I mean really much!) of source code and documentation with Vim.
I would like to know what the major differences
There are many small differences, but, I dare say, nothing is substantial. At least, from an average end-user point of view.
Say, Neovim has "init.vim" and "shada" instead of "vimrc" and "viminfo" respectively. But a typical user would not care if "shada" format differs from "viminfo". And "init.vim" is still the same VimScript, even if it has another name and is located in another directory.
Also, Vim and Neovim have different implementation of
:terminal. But, at least, they both have it now.
Also, say, Neovim has tight integration with Lua and always has Lua engine built-in. That may be of interest to some users, but surely not to everyone.
And so on, and so on.
I am wondering if I should switch to neovim
You should give a try, not "should switch" by any means. If you care, personally I like Vim better.
If you are using neovim 0.4 and vim 8.0 there are no visible differences from a user's perspective. However, neovim 0.5 is usable already which has great integration with lua, a built-in language client, and treesitter support. This means an emerging set of lua plugins that are neovim only (like telescope, luatree) and native lsp support (and plugins like lspsaga) as well as tree sitter driven highlighting, navigation and refactoring. vim 9.0 will introduce a new and faster vimscript that is not entirely backward compatible so neovim and vim will diverge in the near future.
As pointed out by Matt, from a normal-user's perspective, you really can not perceive much difference between Neovim and Vim. Besides, many plugins also try to mitigate the differences between Neovim and Vim by using particular logics for Vim and Neovim differently where necessary.
To get an overview of the differences between Neovim and Vim, open neovim and
One major difference is that neovim can be embedded in another process. This allows one to use neovim inside a browser, together with a full user configuration.
NeoVim has major plugins that use lua instead of vimscript.
luajit is faster than vimscript by 10-100 times (though vim9 has comparable performance: most humans wouldn’t notice the difference).
If you want to run a lua/vimscript benchmark you can use this repo:
$ git clone https://git.sr.ht/~henriquehbr/lua-vs-vimscript $ cd lua-vs-vimscript $ bash benchmark.sh