I've been hearing about Neovim; how does it differ from Vim? All the points on the homepage are just architectural changes 'under the hood'. As a user, what's the difference for me?
-
4The asynchronous feature is a life saver. It makes vim so much more fluid and a lot of plugins can take advantage of it.– tommyipCommented May 19, 2016 at 10:12
-
1Tutor is improved. It looks different.– Fernando RodriguezCommented Sep 24, 2016 at 21:09
-
3"A nice looking website, that’s one thing Neovim did right." — Bram Moolenaar from interview– michaelCommented Jan 5, 2018 at 10:17
-
Some of the basic choices seem odd and irrelevant for the main goals... A lot of it feels like someone who doesn’t like the old code and wants to do it “right.” I can agree that the old code is ugly. But it will take an awful lot of effort to make a new implementation. It’s a lot like what happened to Elvis: A rewrite was going to make it much better, but it took so long, during which Vim added more features, that eventually there are not so many Elvis users. And the rewritten Elvis may have nice code, but users don’t notice that. binpress.com/vim-creator-bram-moolenaar-interview– NeilGCommented Jul 1, 2019 at 23:53
-
5I think I need a 2021 answer for this nice question. I'm new to Vim and I don't know where to start.– NeoZoom.luaCommented Jan 3, 2021 at 16:07
6 Answers
Just like the neovim homepage describes, neovim's objective is to pave the way for a better & more openly community driven open source project.
The architectural changes not only will bring more stability & improve performance to vim but make the code a lot more maintainable and bring the entry barrier slightly down for anyone who is interested to contribute.
One of the key changes also includes the core feature of access to executing jobs / tasks asynchronously in vim, which has been one of the most requested feature of vim since a long time. This can help improve performance of vim even further especially because vim will not have to block while a background job is doing something.
As a vim user, not much might change besides the fact that neovim should grow as a software much faster (fix issues, add features) as compared to stock vim and that it will have much better performance in the long run.
Edit (10 June, 2020):
I think I missed mentioning one key aspect that differentiates VIM from NeoVIM as an open source software.
The underlying problem (whether or not this is a problem is subjective) with VIM has been that Bram Moolenar, the core contributor is the Gate Keeper and to some extent the bottleneck that prevents changes / fixes / new ideas from other developers making into VIM at a fast pace.
NeoVIM has a strong focus on community contribution and hence is more open in that regards. Also helps that there are several core contributors, not just one.
One interesting side-effect of having NeoVIM is that since it directly competes with VIM, it has resulted in Bram be more open to bringing radical innovations to VIM, which in the absense of NeoVIM he would not have. Things like background jobs, popup windows (floating windows) / text properties, inline terminal, etc are examples of ideas that have been added to VIM because they were saught out features that were added to NeoVIM, even though there has been demand for many of these features since long.
-
31+1. Let me also add that the fact that there will be very few user-visible changes is a good thing.– carlosdcCommented Feb 3, 2015 at 22:05
-
64This reads like a rehash of a press release rather than an actual rundown of why somebody should care. For example I've been using vim for two decades and can't remember the last time the core program showed me any kind of instability so why should I care about "more stable"?– CalebCommented Feb 4, 2015 at 9:23
-
2Asynchronous tasks should mean no more blocking vim's interface to do work that could be in the background.– alxndrCommented Feb 10, 2015 at 5:26
-
4
-
21It is no longer true that Vim has no support for running background jobs asyncronously.– RichCommented Sep 26, 2016 at 9:08
I'm specifically addressing:
Why should I care? As a user, what's the difference for me?
The thing I am most excited about as a Vim user are the new kinds of plugins, integrations, and interfaces that will be enabled by the changes under Neovim's hood.
As time goes by you will begin to see really impressive plugins and programs that work with Neovim but not Vim. There's a list of Neovim-specific plugins: here in neovim's github.
I don't know how up-to-date it is, but I am excited to see it grow as we get more tools to make coding more efficient and enjoyable.
My own favorite addition Neovim brings to the table is terminal mode. You can now split your Neovim window and have a terminal emulator running on one side and be editing a file on the other side! I suppose you could even run Neovim inside of itself now, just in case you really wanted to do that.
Having asynchronous plugins is also going to be extremely useful soon; this means we're finally able to have really good code completion, after only 40 years of waiting!
Neovim also has better mouse support than Vim does.
-
5
-
1It's definitely possible to use the mouse in Vim over an SSH connection (I just tried it), but if you were unable to get it working in Vim and it works by default in NeoVim I guess that's a datapoint in favour of your statement that the support in NeoVim is better ;).– RichCommented Sep 26, 2016 at 9:22
-
1I've been using mouse in regular Vim over SSH from Putty running on Windows with a single
set mouse=a
line in vimrc for quite a while Commented Aug 25, 2017 at 23:53 -
2
./configure --enable-terminal
with regular vim these days shrug– dylnmcCommented Feb 26, 2018 at 2:29 -
1Terminal mode on the side sounds like something tmux does just fine in...– qwrCommented Feb 3, 2022 at 23:22
Two points that are not yet addressed by other answers and might be interesting for a user, even or especially new users without a (or with a small) config file:
- NeoVim does not try to be Vi compatible by default. They changed many default values for the settings and are actively discussing such changes: #2676, #6289
- It can be embedded in another process (remember netbeans integration?) and has many different GUIs so MacVim is no longer the fanciest GUI you can find for your
$EDITOR
.
As of the version 0.5, Neovim provides built in support for LSP, Treesitter and threats Lua language as a first class citizen. Those technologies allowed developers to create a rich plugin ecosystem, that provides a lot of useful features for the end user. Some examples:
- Packer – A package manager with support for plugin dependencies, lazy-loading, and installing luarocks.
- Telescope – A highly extendable fuzzy finder over lists. You may find a lot of plugins, that provide integration with it.
- Which Key - A lua plugin that displays a popup with possible keybindings of the command you started typing. This plugin rocks, as it drastically improves the UX of Neovim, displaying tips even for built-in commands!
- Nvim-dap – A debug adapter protocol implementation for step-through debugging of your code.
And those are just a tip of the iceberg! Notice, that some of the above are better versions of existing plugins for Vim, which precisely indicates why Neovim is a better editor and Lua is a better language than VimL.
The listed improvements allow you to be a better developer, like if you are working within a fine IDE, but without the quirks its Vim emulation provides and long loading times.
If you want to check out the full power of Neovim without losing much time, I encourage you to check out some preconfigured environments based on it, such as LunarVim.
Honestly, Neovim is overpowering!
As of writing the answer, the current release is Neovim 0.7. Since neovim uses semver and has not reached major release 1.x, its API is not stable yet. However, it promises "Vimscript 1" compatability.
In my experience, this does not matter for most vim plugins. However, I did find YouCompleteMe requires neovim v0.5+ while Ubuntu 20.04 ships with v0.4.3 (maybe this is the fault of YCM). From what I've seen on GitHub, many new plugins are being written for Neovim in Lua, while many old vim plugins from a decade ago aren't being so actively maintained nowadays.
-
Fwiw, there are many vimscript plugins that are being actively maintained. But many from a decade ago probably still work because of backward-compatibility guarantees.– D. Ben Knoble ♦Commented Sep 10, 2022 at 11:21
-
@D.BenKnoble that's true. just it was disheartening to me to see syntastic being deprecated by its creators– qwrCommented Sep 10, 2022 at 15:52
-
1In this era I’m not sure syntastic is the way I would go. ALE is asynchronous, though I’m starting to run into my own personal problems with it :P– D. Ben Knoble ♦Commented Sep 10, 2022 at 18:23
-
@D.BenKnoble if you can provide your experience with vim vs neovim plugins, I think that would make a great answer. I'm still experimenting– qwrCommented Sep 10, 2022 at 19:58
-
1too much opinion/anecdote, not enough I can make factual. (I actually think most answers on this Q have a good bit of bias, though in part I think that’s because some of them are from before Vim copied some NeoVim stuff back… and because people are too obsessed with Lua of all things. It’s like the JavaScript of editors now and I can’t like it :P). Anyway, this is veering into chatty discussion territory, so come hang out in Vi and Vim Chat if you want to discuss more :)– D. Ben Knoble ♦Commented Sep 10, 2022 at 23:32