由于gvim8.2在win7和win10上安装好后,不能正常使用插件NERDTree(只对当前目录和文件有效,对下一级目录没有反应),尝试在win10的wsl上安装Ubuntu后编译安装vim8.2,结果NERDTree插件能够正常使用,心想是否是gvim软件本身有问题,考虑在winows系统中安装neovim,结果成功了。
call plug#begin('~/AppData/Local/nvim/plugged')`
"中间加入一些插件,例如
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
Plug 'tpope/vim-vinegar'
" file navigation
Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'vim-airline/vim-airline'
" fuzzy file finder
Plug 'kien/ctrlp.vim'
Plug 'atweiden/vim-dragvisuals'
Plug 'gavocanov/foldsearches.vim'
" coc.nvim
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" git tool
Plug 'tpope/vim-fugitive'
" Visual content can move
Plug 'atweiden/vim-dragvisuals'
" Vim global plugin for persistent Visual seletions
Plug 'galli-a/persistentvisuals'
" syntax check/linter
Plug 'vim-syntastic/syntastic'
" surround
Plug 'tpope/vim-surround'
" vim-commentary
Plug 'tpope/vim-commentary'
" emmet
Plug 'mattn/emmet-vim'
" easymotion
Plug 'easymotion/vim-easymotion'
" code debug
Plug 'puremourning/vimspector'
call plug#end()`
import neovim
等,则表示需要安装python2和python3, c:\python3\python -m pip install --user --upgrade pynvim
c:\python2\python -m pip install --user --upgrade pynvim
最后在配置文件 init.vim 中添加两行:
let g:python_host_prog = 'C:\Python2\python.exe'
let g:python3_host_prog = 'C:\Python3\python.exe'
npm install -g neovim
with open(file_path) as f:
with open(file_path, encoding='utf-8') as f:
参考这个 win10 自定义右键菜单