Vim Bundle vundle不会安装

时间:2014-04-11 14:27:58

标签: git vim plugins vundle

平台 - Mac OS- 10.8.5

这是我的.vimrc文件,后面是我得到的错误。 * 我的git存储库设置正确----- * git config --global core.editor“vim”(这是我的.bashrc中的设置) **设置-o vi(在我的.bashrc中设置)

.vimrc文件

set nocompatible " be iMproved, required
filetype off " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" alternatively, pass a path where Vundle should install plugins
"let path = '~/some/path/here'
"call vundle#rc(path)

" let Vundle manage Vundle, required
Plugin 'gmarik/vundle'

" The following are examples of different formats supported.
" Keep Plugin commands between here and filetype plugin indent on.
" scripts on GitHub repos
Plugin 'tpope/vim-fugitive'
Plugin 'altercation/vim-colors-solarized'
Plugin 'ervandew/supertab'
Plugin 'klen/python-mode'
Bundle 'vim-ipython'
" Plugin 'ivanov/vim-ipython'
" scripts from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" scripts not on GitHub
" Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" ...

Bundle 'flazz/vim-colorschemes'

filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - list configured plugins
" :PluginInstall(!) - install (update) plugins
" :PluginSearch(!) foo - search (or refresh cache first) for foo
" :PluginClean(!) - confirm (or auto-approve) removal of unused plugins
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Plugin commands are not allowed.
" Put your stuff after this line
"
" Size of a hard tabstop
set tabstop=8 expandtab shiftwidth=4 softtabstop=4

set foldmethod=indent
set foldnestmax=2
set foldlevel=99

" I prefer to fold code with spacebar
nnoremap za
vnoremap zf

set background=dark
colorscheme solarized

" Have supertab use usercompletion by default, for tke sake of ipython
let g:SuperTabDefaultCompletionType = "context"
i

我得到的错误:


492: Not an editor command: ^M
line 6:
E117: Unknown function: vundle#rc
line 10:
E492: Not an editor command: ^M
line 12:
E492: Not an editor command: Plugin 'gmarik/vundle'^M
line 13:
E492: Not an editor command: ^M
line 17:
E492: Not an editor command: Plugin 'tpope/vim-fugitive'^M
line 18:
E492: Not an editor command: Plugin 'altercation/vim-colors-solarized'^M
line 19:
E492: Not an editor command: Plugin 'ervandew/supertab'^M
line 20:
E492: Not an editor command: Plugin 'klen/python-mode'^M
line 21:
E492: Not an editor command: Bundle 'vim-ipython'^M
line 30:
E492: Not an editor command: ^M
line 31:
E492: Not an editor command: Bundle 'flazz/vim-colorschemes'^M
line 32:
E492: Not an editor command: ^M
line 48:
E474: Invalid argument: softtabstop=4^M
line 49:
E492: Not an editor command: ^M
line 50:
E474: Invalid argument: foldmethod=indent^M
line 51:
E474: Invalid argument: foldnestmax=2^M
line 52:
E474: Invalid argument: foldlevel=99^M
line 53:
E492: Not an editor command: ^M
line 57:
E492: Not an editor command: ^M
line 58:
E474: Invalid argument: background=dark^M
line 59:
E185: Cannot find color scheme solarized^M
line 60:
E492: Not an editor command: ^M
line 62:
E15: Invalid expression: "context"^M

4 个答案:

答案 0 :(得分:3)

插件' gmarik / vundle'

必须是

插件' gmarik / Vundle.vim'

-

另请注意,vundle已经做了一些更改,例如" Bundle"应该是"插件"而不是

call vundle#rc()

现在它

call vundle#begin()

答案 1 :(得分:2)

你的行结尾是错误的 - 你的.vimrc有windows行结尾,使用dos2unix来修复它。

答案 2 :(得分:1)

确保将Vundle克隆到.vim / bundle目录:

 $ git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle 

答案 3 :(得分:1)

我认为这一定是vundle的问题,也许你在" / bundle"中安装了许多vundle。

目录,删除它们并尝试:

sudo git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim