Set Up Neovim on macOS with vim-plug
Install Neovim on macOS with Homebrew, manage plugins with vim-plug, and fix Python path errors by configuring the Python host in init.vim.
In this post
Recently I have switched from vim to neovim, just because it is faster, supports asynchronous plugins, and stores config in .config so I can have all my configs in the same place.
This is a base config for neovim on OS X using vim-plug plugin manager.
neovim latest installation
brew install cmake
brew install luarocks
brew install --HEAD luajit
brew install --HEAD neovim
vim-plug installation
curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim-plug usage
Update .config/nvim/init.vim
call plug#begin('~/.config/nvim/plugged')
"Define your plugins here
Plug 'tpope/vim-surround'
call plug#end()
Then just call the command:
:PlugInstall
Handling python path error
In case of python path error: Python cannot be opened because of a problem
Please add the following to the beginning of the file: .config/nvim/init.vim
let g:python3_host_prog='/usr/bin/python'
let g:python_host_prog='/usr/bin/python2'