vim - NeoVim 插件未安装。 (使用 vim 插件)

标签 vim vim-plugin neovim

请帮助我,我在为我的 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' 

最佳答案

你有两个 plug block ,它们会混淆 vim-plug。将 vim-code-dark 移动到较早的 plug block 中并删除第二个。

关于vim - NeoVim 插件未安装。 (使用 vim 插件),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64483908/

相关文章:

python - vim 的 python 插件,如 vim-r-plugin

vim - Neovim/Vim : Resize window based on type of buffer

lua - NeoVim - 检查 Lua 中是否存在 Vim 函数

vim - 如何将所有当前拼写错误的单词添加到 Vim 的拼写列表中?

r - vim-rmarkdown 插件配置

vim - 在真实终端中运行 :! 命令

vim - 为什么逃亡- :Gdiff exploding in colours and not doing anything useful?

c++ - 仅在特定字符后使用键映射

Vim 自动命令在打开时触发 "nothing"

c++ - 带彩虹括号的 Vim 折叠