Transitioning to Neovim

Moving from vim to nvim is fairly simple it turns out.

All that is needed is to install neovim is to install it via apt-get:

$ sudo apt-get install neovim

For other OSes, install guide available at

Neovim doesn't automatically recognized your .vimrc in its traditional location at the root of your $HOME directory, so you will need to move your .vimrc / .viminfo / other vim related configuration files across to ~/.config/nvim:

$ cd ~
$ mkdir .config/nvim
$ mv .vimrc .config/nvim/init.vim

I also needed to move the contents of my .vim directory across:

$ mv -v ~/.vim/* ~/.config/nvim

Finally I did something fairly sensible and added the aliases below to my .zshrc to ensure that I was always using neovim over vim8:

alias v="nvim"
alias vi="nvim"
alias vim="nvim"

Now run exec $SHELL to reload your shell and run v to enter Neovim. All of your old Vim configuration should work as expected.

If you are using a plugin manager like vim-plug, you may need to change the registered directory where plugins are installed. I needed to change this line from my .vimrc:

- call plug#begin('~/.vim/plugged')
+ call plug#begin('~/.config/nvim/plugged')