title: Vim: Error detected while processing function vundle#config#bundle[2]..<SNR>33_check_bundle_name:
body: <p>I'm currently getting the following error when I open up the vim editor.</p>
  
  <pre><code> Error detected while processing function vundle#config#bundle[2]..&lt;SNR&gt;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
  </code></pre>
  
  <p>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.
  <a href="https://github.com/VundleVim/Vundle.vim/issues/682" rel="nofollow noreferrer">https://github.com/VundleVim/Vundle.vim/issues/682</a></p>
  
  <p>When I run <code>BundleInstall</code> I get the following file open up:</p>
  
  <pre><code>" Installing plugins to /Users/staguilar/.vim/bundle
  Plugin 'VundleVim/Vundle.vim'
  Helptags
  </code></pre>
  
  <p>Not sure if the error is coming from this plugin. Here is my <code>.vimrc</code> file.</p>
  
  <pre><code>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 (&amp;t_Co &gt; 2 || has("gui_running")) &amp;&amp; !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
  </code></pre>
  
  <p>and this is the <code>.vimrc.bundles</code> file.</p>
  
  <pre><code>if &amp;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(&lt;args&gt;)
  
  let g:has_async = v:version &gt;= 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()
  </code></pre>