0

Whenever I try to use Vundle Plugins in Vim, I always get this error:

E492: Not an editor command: Plugin 'VundleVim/Vundle.vim'^M

I've tried using both Vim 7.4 (the one you get from 'apt') and Vim 8.1 (the one you get from cloning the git repo)

Both return the same exact error.

Oddly, Vim says that I have two .vimrc files (after using :version) - one in my home folder (~/.vimrc) and one in ~/.vim/.vimrc, but the latter does not show up in a file explorer, and running 'nano' with root says that the file does not exist.

I've tried uninstalling Vim and manually deleting all Vim related folders/files (even the one in /etc), and re-installing Vim fresh. as well as re-cloning and re-doing my .vimrc file.

Here is my .vimrc file, and the :version command result:

set nocompatible              " be iMproved, required
filetype off                  " required

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

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"

System:

Lubuntu LTS 16.04

  • Did you actually install the plugin? See here: linuxandubuntu.com/home/… – ajgringo619 Sep 15 '19 at 2:09
  • I'm getting the error but I can't figure out how the guy fixed it – explodingfilms101 Sep 15 '19 at 2:27
  • The ^M suggests that your .vimrc file has DOS-style (CRLF) line endings - if you're editing it in vi/vim, try :set ff=unix – steeldriver Sep 15 '19 at 2:27
1

Apparently I was editing the .vimrc file using Notepad which messed up the formatting somehow. Editing the .vimrc file with Vim (ironic?) and doing :set ff=unix fixed the issue.

Thank you @steeldriver for the fix

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.