安装neovim
下载最新版本:https://github.com/neovim/neovim/releases/tag/stable
下载成功后,无须安装,解压安装包,放入合适的目录中,比如 C:\nvim-win64中。
NeoVim有两个启动程序,分别是nvim-qt.exe和nvim.exe,前者是基于Gui的客户端,后者则基于终端Terminal,解压之后,最好将bin目录配置到系统的环境变量:C:\nvim-win64\nvim-win64\bin ,如此,我们就可以在系统的任意位置启动NeoVim。
运行健康检查:checkhealth
根据警告和提示进行相应配置
设置init.vim文件
"C:\Users{username}\AppData\Local\nvim\init.vim"
安装插件管理工具vim-plug
安装要求:https://github.com/junegunn/vim-plug/wiki/requirements
Windows (PowerShell)
iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
ni "$(@($env:XDG_DATA_HOME, $env:LOCALAPPDATA)[$null -eq $env:XDG_DATA_HOME])/nvim-data/site/autoload/plug.vim" -Force
安装python3
直接在命令行上输入python3,如果没有安装,会打开微软商店进行安装。
配置init.vim文件
" Plugins will be downloaded under the specified directory.
call plug#begin('C:\Users\{username}\AppData\Local\nvim-data\plugged')
" Declare the list of plugins.
" List ends here. Plugins become visible to Vim after this call.
call plug#end()
# 配置python3路径
let g:python3_host_prog = 'C:\Users\{username}\AppData\Local\Microsoft\WindowsApps\python3.exe'
第一个NeoVim插件
第一个NeoVim插件我们从主题入手,
修改init.vim配置:
" Plugins will be downloaded under the specified directory.
call plug#begin('C:\Users\{username}\AppData\Local\nvim-data\plugged')
" Declare the list of plugins.
Plug 'navarasu/onedark.nvim'
" List ends here. Plugins become visible to Vim after this call.
call plug#end()
# 配置python3路径
let g:python3_host_prog = 'C:\Users\{username}\AppData\Local\Microsoft\WindowsApps\python3.exe'
运行安装插件命令
在neovim的命令行模式下运行:
:PlugInstall
如果报:PlugInstall threw "not an editor command" on Windows,那就是没有设置对init.vim的路径,可以运行:checkhealth根据提示进行配置。
参考
https://www.cnblogs.com/v3ucn/p/17070289.html
https://github.com/junegunn/vim-plug
https://github.com/junegunn/vim-plug/wiki/tutorial
https://github.com/navarasu/onedark.nvim
https://github.com/neovim/neovim
注意事项
请将路径中的{username}替换为系统登录的用户名
标签:NeoVim,10,0.8,vim,python3,https,com,plug,nvim From: https://www.cnblogs.com/joe-yang/p/17071125.html