I’ve been coding with Vim (Macvim to be more accurate) for about 4 years. I always wanted to switch to Neovim and try it out but because there were no gui available for macOS, I couldn’t completely switch to Neovim.
A couple of days ago, I found neovim-dot-app, installed that on my machine and it worked! Seems like this project (and of course, Neovim) is not very stable yet but I’m coding with Neovim and neovim-dot-app for a few days now and it looks cool. Not sure if I’m going to experience any particular issues with this project though (I will update this page).
So now, I thought it would be useful to public my own Neovim config publicly to save some time. I had some issues with the clipboard, color scheme, plugins and other minor things. I have solved all of them and published them on this Github repo: afshinm/neovim-config.
Neovim on Mac OS
Switch to Neovim today
Also, I use vim-plug to manage the plugins. So, all you need to do to keep your plugins updated is running :PlugUpdate command once in a while.
How to install
So now, I’m going to explain how to install Neovim and the config bundle in this section. I will explain how to install them in macOS but I assume it would be the same procedure, more or less, in other operating systems.
Step 1 ) Install Neovim
First things first, you need to install the core. I’m assuming you have already have brew installed. Now, run these commands:
$ brew install neovim
Now, you should have the Neovim and neovim-dot-app installed. To test it, open terminal write
nvim and hit the enter.
Step 2) Install neovim-dot-app
This step is optional. If you want to work with Neovim using a GUI, read this step. Otherwise, skip to the next step.
According to feedbacks and stars / forks on Github, neovim-dot-app seems to be the best option for a Neovim GUI on macOS. It is something like Macvim, but for Neovim. But bear in mind, you can install any GUI that you are happy with.
Following these steps to install neovim-dot-app:
$ brew tap neovim/neovim
$ brew tap rogual/neovim-dot-app $ brew install neovim-dot-app $ brew linkapps neovim-dot-app
You should have neovim-dot-app installed. Please note that if you are using a different operating system, you need to find the best choice according to your operating system. Here is a list of Neovim GUIs.
Step 3) Install neovim-config
All you need to install this config bundle is cloning this repo in your ~/.config/nvim in Linux or macOS. You can, however, just download the source using this link and paste the content in your Neovim config folder but I would suggest cloning the repo since it would enable your to pull the new updates with git pull command.
Note: Also, if you have already added anything in your Neovim config path, don’t forget to backup your work before replacing this bundle.
After copying the files, run following command in your terminal:
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Above command install vim-plug, which is a super-cool plugin manager for Vim / Neovim.
Almost there. Next, open your Neovim and run:
Congrats! Your awesome Neovim is almost ready. One last step to active YouCompleteMe plugin. Run this command to install it:
~/.config/nvim/plugged/YouCompleteMe/install.py --racer-completer --tern-completer
Done! now start using your Neovim.
I will write a simple bash script soon to enable users to easily install, update or remove the config bundle.
If you have any issues, questions or found a bug in the config file, please submit a PR or issue on the Github repo afshinm/neovim-config.