197

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?

Martin Tournoij
  • 62,054
  • 25
  • 192
  • 271
  • 3
    The asynchronous feature is a life saver. It makes vim so much more fluid and a lot of plugins can take advantage of it. – tommyip May 19 '16 at 10:12
  • 1
    Tutor is improved. It looks different. – Fernando Rodriguez Sep 24 '16 at 21:09
  • 3
    "A nice looking website, that’s one thing Neovim did right." — Bram Moolenaar from interview – michael Jan 05 '18 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. https://www.binpress.com/vim-creator-bram-moolenaar-interview/ – NeilG Jul 01 '19 at 23:53
  • I do hope that the nice things that NeoVim comes up with can be added back to Vim. I mean, who doesn’t want better plugin support, a better GUI and embedding? The big question is how to do that, and who is going to implement it properly. https://www.binpress.com/vim-creator-bram-moolenaar-interview/ – NeilG Jul 01 '19 at 23:53
  • 5
    I think I need a 2021 answer for this nice question. I'm new to Vim and I don't know where to start. – NeoZoom.lua Jan 03 '21 at 16:07

6 Answers6

129

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.

Dhruva Sagar
  • 5,510
  • 2
  • 22
  • 17
  • 31
    +1. Let me also add that the fact that there will be very few user-visible changes is a good thing. – carlosdc Feb 03 '15 at 22:05
  • 62
    This 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"? – Caleb Feb 04 '15 at 09:23
  • 1
    Like I said in the last paragraph, it's not about stability but more about the kind of community it's built around. Nobody dare question vim's stability, I surely would not, have been using it for 8 long years and since last 2 years have been using the head version! – Dhruva Sagar Feb 04 '15 at 10:03
  • 2
    Asynchronous tasks should mean no more blocking vim's interface to do work that could be in the background. – alxndr Feb 10 '15 at 05:26
  • 1
    How usable is it right now? Anyone tried it with FinalTerm? – muru Feb 17 '15 at 00:28
  • 1
    @muru it's very much usable, not too sure about using with FinalTerm though, give it a shot. – Dhruva Sagar Feb 17 '15 at 02:57
  • 1
    @Caleb As a user you are currently a non-user of asynchronous plugins. This won't apply to users of Neovim. –  Feb 20 '15 at 12:40
  • 4
    Is there any evidence in the two years that that neovim has been active that it's growing faster, and has better performance? – Sparhawk Mar 05 '16 at 23:14
  • 20
    It is no longer true that Vim has no support for running background jobs asyncronously. – Rich Sep 26 '16 at 09:08
  • 2
    If you've ever accidentally run a vim grep on a big node mono-repository with a bunch of node-modules in each project then you know why async tasks is a god send. – Michael Brown Mar 13 '19 at 22:14
  • 2
    @Sparhawk I think that is hard to say. However I believe the healthy competition between VIM & NeoVIM has benefited the community in a positive way for sure. – Dhruva Sagar Jun 10 '20 at 18:16
55

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.

nilon
  • 217
  • 2
  • 9
Jim Garvin
  • 659
  • 4
  • 4
25

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
    They should call it Metavim :P – Tumbler41 May 05 '16 at 21:52
  • I don't know of any mouse-specific changes that Neovim has which would make it better than Vim. – jamessan May 06 '16 at 00:08
  • The one coming to mind right now is that you can be in a terminal ssh session, open up Neovim, and click on a spot to edit it. I don't think Vim can do that, though it's possible that I just don't have a big enough .vimrc yet! I guess this might be better termed as ssh support than mouse support though. – Johnathan Andersen May 06 '16 at 17:32
  • 1
    It'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 ;). – Rich Sep 26 '16 at 09:22
  • 1
    I'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 – Thunderbeef Aug 25 '17 at 23:53
  • 2
    ./configure --enable-terminal with regular vim these days shrug – dylnmc Feb 26 '18 at 02:29
  • It'd be great if this answer also included how to actually do this! – LondonRob Jul 05 '18 at 10:33
  • 1
    Terminal mode on the side sounds like something tmux does just fine in... – qwr Feb 03 '22 at 23:22
11

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:

  1. 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
  2. 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.
Lucas
  • 1,629
  • 10
  • 21
6

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!

gikari
  • 61
  • 1
  • 1
0

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.

qwr
  • 183
  • 6
  • 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 Sep 10 '22 at 11:21
  • @D.BenKnoble that's true. just it was disheartening to me to see syntastic being deprecated by its creators – qwr Sep 10 '22 at 15:52
  • 1
    In 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 Sep 10 '22 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 – qwr Sep 10 '22 at 19:58
  • 1
    too 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 [chat] if you want to discuss more :) – D. Ben Knoble Sep 10 '22 at 23:32