install neovim
进入neovim下载页面neovim_downpage下载并安装对应版本(此处为win32)
install Python
进入Python_Downpage下载安装Python安装时注意勾选pip一并安装
在Powershell中使用neovim
以管理员身份运行powershell并输入
Set-ExecutionPolicy RemoteSigned(按Y确定后)
new-item -path $profile -itemtype file -force
修改图示路径下对应文件 内容为
set-alias vim "C:\Users\63164\nvim\Neovim\bin\nvim.exe" # 此处为vim的安装路径
重启powershell输入vim

- **
- **
安装配置nvim插件(vim-plug)
此次安装环境为win10 powershell 安装neovim
powershell执行下述命令
md ~\AppData\Local\nvim\autoload$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'(New-Object Net.WebClient).DownloadFile($uri,$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath("~\AppData\Local\nvim\autoload\plug.vim"))
plug.vim文件下载完成后,再创建对应路径下init.vim文件并修改
- Windows:
~\AppData\Local\nvim\init.vim
if has('win32') || has('win64')let g:plugged_home = '~/AppData/Local/nvim/plugged'elselet g:plugged_home = '~/.vim/plugged'endifcall plug#begin(g:plugged_home)Plug 'chriskempson/base16-vim'Plug 'vim-airline/vim-airline'Plug 'vim-airline/vim-airline-themes'Plug 'Yggdroot/indentLine'Plug 'w0rp/ale'Plug 'ncm2/ncm2'Plug 'roxma/nvim-yarp'Plug 'ncm2/ncm2-bufword'Plug 'ncm2/ncm2-path'Plug 'ncm2/ncm2-jedi'Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }Plug 'Chiel92/vim-autoformat'call plug#end()filetype plugin indent on
进入vim,命令行模式下输入PlugInstall 
安装后如上图所示
完成后,继续配置init.vim文件(颜色,缩进,快捷键等)
" Configurations Part" UI configurationsyntax onsyntax enable" colorschemelet base16colorspace=256colorscheme base16-gruvbox-dark-hardset background=dark" True Color Support if it's avaiable in terminalif has("termguicolors")set termguicolorsendifif has("gui_running")set guicursor=n-v-c-sm:block,i-ci-ve:block,r-cr-o:blocksendifset numberset relativenumberset hiddenset mouse=aset noshowmodeset noshowmatchset nolazyredraw" Turn off backupset nobackupset noswapfileset nowritebackup" Search configurationset ignorecase " ignore case when searchingset smartcase " turn on smartcase" Tab and Indent configurationset expandtabset tabstop=4set shiftwidth=4" vim-autoformatnoremap <F3> :Autoformat<CR>" NCM2augroup NCM2autocmd!" enable ncm2 for all buffersautocmd BufEnter * call ncm2#enable_for_buffer()" :help Ncm2PopupOpen for more informationset completeopt=noinsert,menuone,noselect" When the <Enter> key is pressed while the popup menu is visible, it only" hides the menu. Use this mapping to close the menu and also start a new line.inoremap <expr> <CR> (pumvisible() ? "\<c-y>\<cr>" : "\<CR>")" uncomment this block if you use vimtex for LaTex" autocmd Filetype tex call ncm2#register_source({" \ 'name': 'vimtex'," \ 'priority': 8," \ 'scope': ['tex']," \ 'mark': 'tex'," \ 'word_pattern': '\w+'," \ 'complete_pattern': g:vimtex#re#ncm2," \ 'on_complete': ['ncm2#on_complete#omni', 'vimtex#complete#omnifunc']," \ })augroup END" Alelet g:ale_lint_on_enter = 0let g:ale_lint_on_text_changed = 'never'let g:ale_echo_msg_error_str = 'E'let g:ale_echo_msg_warning_str = 'W'let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'let g:ale_linters = {'python': ['flake8']}" Airlinelet g:airline_left_sep = ''let g:airline_right_sep = ''let g:airline#extensions#ale#enabled = 1let airline#extensions#ale#error_symbol = 'E:'let airline#extensions#ale#warning_symbol = 'W:'
Code completion and code lint/formatting
为了完成代码,语法检查和代码格式化,我们需要以下python包
jedifor code completion:pip install jediflake8for code linting:pip install flake8autopep8for code formatting:pip install autopep8
自动报错、代码格式化和自动补全全部OK 了


参考连接@yufanlu
