NeoVim插件无法安装。(使用vim-plug)

3
请帮助我,我在为我的NeoVim设置init.vim时遇到了奇怪的问题。以下是我的init.vim文件,没有显示任何错误。但是当我想安装插件时,在运行:PlugInstall命令后,只有vim-code-dark插件被安装了,其他插件如vim-polyglot和NERDTree没有被安装。请告诉我我错在哪里。我已经困在这里2天了,但无法设置我的Vim编辑器。
" Auto-Install vim-plug
if empty(glob('~/.config/nvim/autoload/plug.vim'))
  silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
    \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  "autocmd VimEnter * PlugInstall
  "autocmd VimEnter * PlugInstall | source $MYVIMRC
endif

"__________________________________________________________________________________________

" Vim-Editor Plugins
call plug#begin('~/.config/nvim/autoload/plugged')
    Plug 'sheerun/vim-polyglot'
    Plug 'scrooloose/NERDTree'
    Plug 'jiangmiao/auto-pairs'
call plug#end()

"__________________________________________________________________________________________

" General Editor Settings
" set leader key
let g:mapleader = "\<ALT>"

" vim basics
set encoding=utf-8
syntax enable
set relativenumber
set noswapfile
set scrolloff=4
set backspace=indent,eol,start

" vim basics
set encoding=utf-8
syntax enable
set relativenumber
set noswapfile
set scrolloff=4
set backspace=indent,eol,start


" indentation
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
set fileformat=unix
set incsearch
set ignorecase
set smartcase
set nohlsearch
set nobackup
set nowrap
filetype plugin indent on

" autocompletion
set updatetime=300
"__________________________________________________________________________________________

" Vim Themes

call plug#begin('~/.config/nvim/autoload/plugged')
    Plug 'tomasiser/vim-code-dark'
call plug#end()

colorscheme codedark
let g:airline_theme = 'codedark' 

@L3viathan 你应该把这个发表为答案。 - Jake Grossman
1个回答

3
你有两个plug块,这会让vim-plug混乱。将vim-code-dark移到较早的plug块中并删除第二个块。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接