问题
I am having trouble getting Vundle for Vim to work (I am on Ubuntu 14.04). Here the relevant part from my .vimrc
4 " For Vundle$
5 filetype off$
6 set rtp+=~/.vim/bundle/vundle$
7 call vundle#rc()$
8 $
9 " Let Vundle manage Vandle$
10 Plugin 'gmarik/vundle'$
11 $
12 Plugin 'honza/vim-snippets'$
13 Plugin 'bling/vim-airline'$
14 Plugin 'tpope/vim-fugitive'$
15 Plugin 'tpope/vim-rails.git'$
16 Plugin 'tomtom/tcomment_vim'$
17 Plugin 'altercation/vim-colors-solarized'$
18 Plugin 'tomasr/molokai'$
19 Plugin 'vim-ruby/vim-ruby'$
20 Plugin 'tpope/vim-surround'$
21 Plugin 'jiangmiao/auto-pairs'$
22 Plugin 'ervandew/supertab'$
23 Plugin 'kchmck/vim-coffee-script'$
24 Plugin 'kien/ctrlp.vim'$
25 Plugin 'skalnik/vim-vroom'$
26 Plugin 'tpope/vim-dispatch'$
27 $
28 call vundle#end()$
29 $
30 filetype plugin indent on$
Why does it throw an error E492: Not an editor command: PluginInstall
?
回答1:
You are missing
call vundle#end()
between lines 26 and 28.
Note that Vundle's API has changed: it's not :Bundle*
anymore, it's :Plugin*
.
回答2:
Turns out that call vundle#rc()
seems to be deprecated. Using call vundle#begin()
fixed the issue for me.
回答3:
This error message came up may be because your vi is not vim.
try install the vim first. If it let you, that means is it the problem.
sudo yum install vim
set alias
alias vi=vim
Then try run vi and
:PluginInstall
回答4:
This happened to my work machine (Windows) because I was using Cygwin ViM. The problem was that when I cloned Vundle.vim it used Windows style line endings and the Vundle plugin wasn't loading. I had to run find ~/.vim -type f -iname '*.vim' -exec dos2unix {} \+
to convert my files to unix line endings before it worked.
This assumes you have dos2unix installed.
来源:https://stackoverflow.com/questions/24185580/vundle-e492-not-an-editor-command-plugininstall