首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Vim:处理函数vundle#config#bundle[2]..<SNR>33_check_bundle_name:时检测到错误

Vim:处理函数vundle#config#bundle[2]..<SNR>33_check_bundle_name:时检测到错误
EN

Stack Overflow用户
提问于 2019-11-23 01:00:52
回答 1查看 1.6K关注 0票数 0

当我打开vim编辑器时,我得到了下面的错误。

代码语言:javascript
运行
复制
 Error detected while processing function vundle#config#bundle[2]..<SNR>33_check_bundle_name:
    line    1:
    E121: Undefined variable: s:bundle_names
    E116: Invalid arguments for function has_key(s:bundle_names, a:bundle.name)
    line   11:
    E121: Undefined variable: s:bundle_names
    Press ENTER or type command to continue

从研究来看,这似乎来自两个相互冲突的bundles.But,很难确定这个错误来自哪个插件,因为我似乎只使用了Vundle。https://github.com/VundleVim/Vundle.vim/issues/682

当我运行BundleInstall时,我打开了以下文件:

代码语言:javascript
运行
复制
" Installing plugins to /Users/staguilar/.vim/bundle
Plugin 'VundleVim/Vundle.vim'
Helptags

不确定错误是否来自此插件。这是我的.vimrc文件。

代码语言:javascript
运行
复制
let mapleader = " "

set backspace=2   " Backspace deletes like most programs in insert mode
set nobackup
set nowritebackup
set noswapfile    " http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287
set history=50
set ruler         " show the cursor position all the time
set showcmd       " display incomplete commands
set incsearch     " do incremental searching
set laststatus=2  " Always display the status line
set autowrite     " Automatically :write before running commands

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on")
  syntax on
endif

if filereadable(expand("~/.vimrc.bundles"))
  source ~/.vimrc.bundles
endif

" Wrap commit message to 72 characters
filetype indent plugin on
autocmd FileType gitcommit set textwidth=72
" Set spellfile to location that is guaranteed to exist, can be symlinked to
" Dropbox or kept in Git and managed outside of thoughtbot/dotfiles using rcm.
set spellfile=$HOME/.vim-spell-en.utf-8.add

" Autocomplete with dictionary words when spell check is on
set complete+=kspell

" Always use vertical diffs
set diffopt+=vertical

" Local config
if filereadable($HOME . "/.vimrc.local")
  source ~/.vimrc.local
endif

这是.vimrc.bundles文件。

代码语言:javascript
运行
复制
if &compatible
  set nocompatible
end

" Remove declared plugins
function! s:UnPlug(plug_name)
  if has_key(g:plugs, a:plug_name)
    call remove(g:plugs, a:plug_name)
  endif
endfunction
command!  -nargs=1 UnPlug call s:UnPlug(<args>)

let g:has_async = v:version >= 800 || has('nvim')

call plug#begin('~/.vim/bundle')

" Define bundles via Github repos
Plug 'christoomey/vim-run-interactive'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'elixir-lang/vim-elixir'
Plug 'fatih/vim-go'
Plug 'janko-m/vim-test'
Plug 'kchmck/vim-coffee-script'
Plug 'pangloss/vim-javascript'
Plug 'pbrisbin/vim-mkdir'
Plug 'slim-template/vim-slim'
Plug 'tpope/vim-bundler'
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-projectionist'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-rake'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-rhubarb'
Plug 'tpope/vim-surround'
Plug 'vim-ruby/vim-ruby'
Plug 'vim-scripts/tComment'
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
Plug 'https://github.com/scrooloose/nerdtree.git'
Plug '/usr/local/opt/fzf'
Plug 'mustache/vim-mustache-handlebars'

if g:has_async
  Plug 'w0rp/ale'
endif

if filereadable(expand('~/.vimrc.bundles.local'))
  source ~/.vimrc.bundles.local
endif

call plug#end()
EN

回答 1

Stack Overflow用户

发布于 2020-08-19 04:25:56

查看vimrc.bundles.local文件,并将其与vimrc.bundles文件进行比较。查看是否在这两个文件中都出现了任何插件,如果找到,则将其从其中任何一个文件中删除。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58998683

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档