Having just been confirmed as a speaker at LinuxCon on the subject of Vim, I thought it behooved me to get more familiar with Neovim. Neovim is a "fork" (their word, although it seems to be a substantial re-write) of Vim. I have high hopes for it as Vim's code-base is notoriously difficult to work with. But Neovim is - relatively speaking - in its infancy, and not yet available from standard package repositories for most distros.
Easiest is Installing Neovim on Mac. Neovim is available in a PPA for Ubuntu, which makes it quite straight-forward: Installing Neovim on Ubuntu. Look further down for the more questionable Installing Neovim on Debian. I don't cover how to install the expected but optional Python support packages.
NOTE: if you're reading this more than a month after I wrote it, it's entirely possible all of this will be null and void with stale links and suggestions you shouldn't follow.
Installing Neovim on Mac
Installation is simple if you have Homebrew:
brew update ; brew install neovim/neovim/neovim. This may install a lot of dependencies, depending on what you've previously installed. In my case it needed to compile the package, which meant it installed the entire build chain. So it took a few minutes, but was otherwise straightforward.
Neovim's config on the Mac goes into the ~/.config/nvim/ folder - although I had to create ~/.config/.
Installing Neovim on Ubuntu
This is almost entirely a clone of https://github.com/neovim/neovim/wiki/Installing-Neovim#ubuntu . I'm using "trusty" on amd64: I haven't examined the PPA to confirm, but I suspect they have pretty thorough support for other combinations(?).
# apt-get install software-properties-common ... software-properties-common is already the newest version. ... # apt-get install python-software-properties ... python-software-properties is already the newest version. ...
The above are required packages - but in my case, already installed.
# add-apt-repository ppa:neovim-ppa/unstable ... # apt-get update ... # apt-get install neovim ...
And that's all! Your binary name is "nvim".
Installing Neovim on Debian
Neovim's Github page is now rather disingenuously saying "Neovim is in Debian." What they mean (and should have said) is "Neovim is in Debian stretch," while what they implied is that their package is in Debian stable/jessie. If you want Neovim in jessie, you'll still have to fight with package pinning, something I generally try to avoid. Either way, this section is outdated and shouldn't be used. If you're using stretch, follow the instructions on their page. If you're using jessie, you should probably stick with old Vim.
There are many ways to install Neovim on your system. The old way (not saying it's wrong, but it can be painful) is to download the source and compile it yourself. This often requires dev packages you don't have installed, and can take hours of experimentation. With Debian, another option is package pinning: this involves setting up Apt so that it knows about not only the repo associated with your current version of the distribution (in my case "stretch", which is currently "testing"), but also knows about one of the less stable repositories like "unstable" (aka "sid") or "experimental". As Neovim is very new, it's only in experimental. I'm not eager to pin it because the OS will then pull in appropriate library packages and continue to track neovim plus all of its libraries and dependencies. This can leave you with weird dependency mangling I'd prefer to avoid. I might do this if I was planning on using this long term, but this is - at the moment - a very temporary experiment. So I'm choosing to download packages directly from the Debian FTP sites and install them by hand (which they repeatedly and explicitly recommend against). I keep a detailed log, and will delete all the packages I installed at a later date. Or if I don't, they'll quietly go stale and are (I think) actually less likely to affect the system than pinned packages that keep updating themselves.
Our starting point is https://packages.debian.org/experimental/neovim . The dependency list is important: I'll walk through what worked for me, but you may find other deps aren't fulfilled for you so you may need to return here. Useful commands are aptitude search libtermkey which will search for any packages that exactly or partially match libtermkey, and aptitude show libtermkey1 which will tell you details (including the exact version number) of the package it will install.
Go to the bottom of the page and click on your platform type: for me, it's "amd64". From the next page, download the .deb package for Neovim. Repeat this process for the neovim-runtime package ( https://packages.debian.org/experimental/neovim-runtime ). A couple of dependencies we need from experimental:
Repeat the process of going to the bottom of the page, following your platform type and downloading the package.
There are a couple deps that are already available in stretch:
# apt-get install libjemalloc1 ... # apt-get install libluajit-5.1-2 ... # apt-get install libtermkey1 ...
We're now ready for the packages that we downloaded:
# dpkg -i libmsgpackc2_1.4.0-2_amd64.deb libvterm0_0~bzr679-1_amd64.deb ... # dpkg -i neovim-runtime_0.1.3-1_all.deb neovim_0.1.3-1_amd64.deb ...
Note that I'm showing the amd64 version here: translate for your own platform.
You should at this point have a working neovim on your system.