How to start using Neovim instead of Vim

5 minutes read

In this article I want to show you how to start using Neovim instead of Vim with a minimum effort. If you haven’t heard about Neovim or don’t understand why it might be useful for you, read Why Neovim is better than Vim blogpost first.

Actually, Neovim is compatible with almost all Vim’s features, so in most cases you will be able to use both editors with the same configuration.



The easiest way to install Neovim on OS X is with brew:

$ brew install neovim/neovim/neovim

If you need to install it without brew or your OS is different, refer to an official wiki for instructions.

Run Neovim from the console with nvim command after installation succeeds.

Linking configuration

Neovim uses ~/.config/nvim/init.vim configuration file (like .vimrc for Vim) and ~/.config/nvim/ directory (like ~/.vim/). So, to just start using existed Vim configuration you have to link those files as follows:

$ ln -s ~/.vim ~/.config/nvim
$ ln -s ~/.vimrc ~/.config/nvim/init.vim

At this point you have to try to run Neovim again to be sure that it is compatible with existed configuration. If something fails, you will need to temporary disable it (unload a plugin or comment an option) to prevent any errors.

A full set of differences between Vim and Neovim features you can find here.

Python support

If you want support for Python plugins such as YouCompleteMe, you need to install a Python module in addition to Neovim itself.

Installation depends on which version of python you need. But, in general, it is as simple as:

$ pip install neovim

If you need any customization you may refer to the official documentation.

If the problem with existed plugins was an absence of python, it’s a time to re-enable it.

Graphical Interface

If you prefer using GVim instead of Vim, you would love Neovim-dot-app. It looks almost the same as Graphical Vim, but unfortunately, available only for OS X.

Installation with brew is very simple:

$ brew tap rogual/neovim-dot-app
$ brew install --HEAD neovim-dot-app

Fixing configuration issues

If your Vim’s configuration includes inconsistent with Neovim options, to stay backward compatible with Vim, I will suggest to set such options conditionally, for example:

if !has('nvim')
  set ttymouse=xterm2

If at this point you still have issues with a configuration (Neovim shows an error at startup or won’t start or some features do not work), unfortunately, you have to read documentation, search a solution on the internet or ask a development team for help.

If you faced with (or solved) such kind of issue, please post a comment below. This might help somebody in future.

Further investigation/configuration

After all is set up, you have to try the power of Neovim. The following resources might be useful for further investigation:

Leave a Comment