Vim Error E492 - Not an editor command: PluginInstall
Asked Answered
I

4

33

I am trying to install Vundle on my Macvim. I followed the following link to get Vundle. I also configured my .vimrc file. But when I try PluginInstall, I get the following error.

E492: Not an editor command: PluginInstall

My .vimrc contains the following:

  1 set nocompatible    "https://mcmap.net/q/234135/-in-a-vimrc-is-set-nocompatible-completely-useless
    ompatible-completely-useless
  2
  3 " https://github.com/gmarik/Vundle.vim
  4 filetype off                  " required
  5
  6 " set the runtime path to include Vundle and initialize
  7 set rtp+=~/.vim/bundle/Vundle.vim
  8 call vundle#begin()
  9 " alternatively, pass a path where Vundle should install plugins
 10 "call vundle#begin('~/some/path/here')
 11
 12 " let Vundle manage Vundle, required
 13 Plugin 'gmarik/Vundle.vim'
 14
 15 " All of your Plugins must be added before the following line
 16 call vundle#end()            " required
 17 filetype plugin indent on    " required

My vim directory:

Username-MacBook-Pro:bundle u1$ pwd
/Users/u1/.vim/bundle
Username-MacBook-Pro:bundle u1$ ls
Vundle.vim

I also checked this stackoverflow post. But it didn't solve my problem. Why does it throw such an error and how can I find what exactly is my issue.

Irresolvable answered 3/5, 2015 at 17:56 Comment(0)
I
67

I had to install Vundle into Plugin directory instead of Bundle. It solved the issue.

git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/plugin/Vundle.vim
Irresolvable answered 3/5, 2015 at 18:50 Comment(3)
Came here after this Digital Ocean doc lead me astray.Bodnar
Confirmed this solution on Catalina/Brew. Thanks SyncMaster.Interpenetrate
Bless your soul.Chromatophore
J
2

You can check the output of :version

   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"

Note which vimrc file you are using, say you are configuring $HOME/vimrc, but vim is reading $HOME/.vimrc (without dot at filename)

This happened to me.

Hope this will help you.

Jay answered 14/11, 2016 at 3:4 Comment(1)
This was the problem for me. I have a funky thing where I import vim configs into ~/.vimrc with lines like, :source $HOME/.vim/vimrc_default.vim. Silly, but I was looking at .vim/ and failed to notice ~/.vimrc was gone! Moral of the story, vim needs it's config file--wherever you put it.Bovine
E
1

As mentioned here, I needed to set up Vundle like this:

$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Afterwards, the error got resolved. By the way, I am on a FreeBSD 10.3-STABLE machine not macOS

Eaglewood answered 7/9, 2017 at 2:54 Comment(0)
F
1

This could be as a result of end of line characters, CRLF for windows and LF for linux.
Change your line endings.
if on unix in your ~/.vimrc file :

:set fileformat=unix :w

Foregoing answered 28/5, 2018 at 6:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.