简体   繁体   中英

Vim: Error detected while processing function vundle#config#bundle[2]..<SNR>33_check_bundle_name:

I'm currently getting the following error when I open up the vim editor.

 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

From doing research it seems as though this is coming from two conflicting bundles.But is hard to determine from what plugin this error is comign from since it seems I'm only using Vundle. https://github.com/VundleVim/Vundle.vim/issues/682

When I run BundleInstall I get the following file open up:

" Installing plugins to /Users/staguilar/.vim/bundle
Plugin 'VundleVim/Vundle.vim'
Helptags

Not sure if the error is coming from this plugin. Here is my .vimrc file.

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

and this is the .vimrc.bundles file.

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()

Look in your vimrc.bundles.local file and compare it with your vimrc.bundles file. See if you find any plugin appearing in both files, and if you find it, remove it from either of them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM