14

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.

2
13

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.

8
  • 3
    That would require an interesting feat of time travel. Neovim began in early 2014, and I have a receipt here for a donation I made to the project in 2015. Vim 8 was released late in 2016. So the only sense in which Neovim is a "fork of Vim8" is that it came after 7.4.
    – hobbs
    Jun 8 '20 at 6:58
  • 4
    And I never suggested any such thing. Please read more carefully. Neovim introduced many features which Vim got later. At the time, 7.4 was the current release, and the version to compare to. 8.0 added many of the same features (albeit sometimes in incompatible ways), lessening the difference. That was 100% my point.
    – hobbs
    Jun 8 '20 at 7:11
  • 2
    @hobbs The OP is not about the historical details, but the current state only. As of now, there remains nothing special one should "absolutely" prefer one application to another.
    – Matt
    Jun 8 '20 at 7:32
  • 1
    The Neovim team backports patches when they are relevant, that's why v:version reports 800, but that's a bug, it should report the current Neovim's version. Just to clarify the historical point of view, this is the first commit in the Neovim repository
    – Tae
    Jun 8 '20 at 8:56
  • 1
    Neovim is also working on native language server support, don't know about vim.
    – Waqar
    Jun 9 '20 at 8:23
7

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.

5

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 read :h vim-differences.

3

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.

0

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://github.com/henriquehbr/lua-vs-vimscript
$ cd lua-vs-vimscript
$ bash benchmark.sh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy