1.安装nvim
brew install nvim
2.查看nvim的安装路径
brew list nvim
 可以发现nvim安装在 /opt/homebrew/Celler/neovim 文件夹中,进入文件夹后可以看到只有一个文件: 
3.安装vim-plug插件
vim-plug的github网址为:https://github.com/junegunn/vim-plug
3.1 在安装插件之前需要先安装curl
brew install curl
3.2 在用github上的安装命令

sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
3.3 运行完之后可能会遇到一个问题
【“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”】错误
对于这种错误可以采用添加配置的方式来解决 修改文件/ect/hosts 解决 
su nvim /ect/hosts
然后添加配置信息:
199.232.68.133 raw.githubusercontent.com
199.232.68.133 user-images.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com
添加完之后再次运行github上的安装脚本命令就可以了
4.给nvim添加配置文件
配置文件的添加路径是:~/.config/nvim/init.vim   没有这个文件可以自行创建 创建完成后使用指令进行编辑:
su nvim ~/.config/nvim/init.vim
打开后将github上的这两句话粘贴上去
call plug#begin()
中间是需要安装的插件
call plug#end()
中间可以选择安装的插件在网站https://vimawesome.com/ 上 选择的是VimPlug 方法  将这行代码复制替换到~/.config/nvim/init.vim 文件的“中间是需要安装的插件”处就可以了  之后使用nvim的命令行模式输入
: PlugInstall
就可以将配置文件中间的插件全部安装上去
|