Can't BundleInstall the vim-css-color plugin u

2019-08-30 08:28发布

问题:

I added Bundle 'ap/vim-css-color' to my .vimrc under the " original repos on github section and ran :BundleInstall but I do not see it the list of newly installed bundles that shows up in the new buffer. In fact even if I comment out a Bundle line in my .vimrc and do :BundleClean the plugin remains in that list.

How can I get Vundle to work?

my .vimrc

set nocompatible

filetype off  " required!

set rtp+=~/.vim/bundle/vundle
call vundle#rc()

" let Vundle manage Vundle
" required! 
Bundle 'gmarik/vundle'

" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-fugitive'
" Bundle 'tpope/vim-haml'
Bundle 'ap/vim-css-color'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'vim-scraper/packages'
Bundle "pangloss/vim-javascript"
" vim-scripts repos
Bundle 'surround.vim'
Bundle 'delimitMate.vim'
Bundle 'hail2u/vim-css3-syntax'
" Bundle 'skammer/vim-css-color'
" Bundle 'AutoComplPop'
" Bundle 'ervandew/supertab'
Bundle 'snipMate'
Bundle 'tComment'
" Bundle 'mru.vim'
Bundle 'scrooloose/nerdtree'
Bundle 'matchit.zip'
Bundle 'Vimball'
Bundle 'ScrollColors'
Bundle 'L9'
Bundle 'FuzzyFinder'
" non github repos
Bundle 'git://git.wincent.com/command-t.git'     

Result after running :BundleInstall

" Installing bundles to /home/max/.vim/bundle
Bundle 'gmarik/vundle'
Bundle 'tpope/vim-fugitive'
Bundle 'tpope/vim-haml'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup'
Bundle 'pangloss/vim-javascript'
Bundle 'surround.vim'
Bundle 'delimitMate.vim'
Bundle 'hail2u/vim-css3-syntax'
Bundle 'skammer/vim-css-color'
Bundle 'snipMate'
Bundle 'tComment'
Bundle 'mru.vim'
Bundle 'scrooloose/nerdtree'
Bundle 'matchit.zip'
Bundle 'Vimball'
Bundle 'ScrollColors'
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'git://git.wincent.com/command-t.git'
Helptags

回答1:

As mentioned by romainl, you have clashing names. Vundle doesn't really differentiate between Github usernames when saved, just the name of the repositories. In other words, it doesn't notice if you switch from skammer/vim-css-color to ap/vim-css-color. Take a look at how it stores the bundles:

$ ls -l .vim/bundle/
total 88K
[..]
drwxr-xr-x  5 tim tim 4.0K 12.04.13 00:31 vim-autoclose
drwxr-xr-x  4 tim tim 4.0K 11.05.13 03:27 vim-css-color
drwxr-xr-x  6 tim tim 4.0K 12.04.13 00:30 vim-easymotion
[..]

Therefore; clean up your mess:

  1. Remove/comment out both */vim-css-color entries
  2. Restart Vim - let Vundle refresh the list of bundles
  3. :BundleClean - notice how it'll ask if you want to remove Bundle 'vim-css-color', and not specifying the Github username.
  4. Re-add/uncomment Bundle 'ap/vim-css-color'
  5. Restart Vim
  6. :BundleInstall - now installs Bundle 'ap/vim-css-color'