I am working on a CentOs machine. Vim works fine. But when I git commit -v It seems that something is wrong:

[vagrant@localhost dotfiles]$ git add .
[vagrant@localhost dotfiles]$ git commit -v
Error detected while processing /home/vagrant/.vimrc:
line    6:
E492: Not an editor command: Plugin 'gmarik/Vundle.vim'            " vim bundle manager
line    7:
E492: Not an editor command: Plugin 'kien/ctrlp.vim'               " finder ...
line    8:
E492: Not an editor command: Plugin 'fugitive.vim'                 " git integration
line    9:
E492: Not an editor command: Plugin 'MarcWeber/vim-addon-mw-utils' " add your local vimrc
line   10:
E492: Not an editor command: Plugin 'tomtom/tlib_vim'
line   11:
E492: Not an editor command: Plugin 'garbas/vim-snipmate'          " add snippets to your vim
line   12:
E492: Not an editor command: Plugin 'scrooloose/nerdtree'          " tree of files and folders
line   13:
E492: Not an editor command: Plugin 'tommcdo/vim-lion'             " align equals
line   14:
E492: Not an editor command: Bundle 'vim-php/vim-composer'
line   29:
E518: Unknown option: foldlevel=1
line   30:
E518: Unknown option: foldlevelstart=42
line   31:
E518: Unknown option: foldmethod=indent
Press ENTER or type command to continue
  • It seems like Vundle didn't get installed properly, leading to ever Vundle command failing. How did you install Vundle, and what does your .vimrc contain? – muru Jul 27 '15 at 11:01
  • 2
    What is the value of $EDITOR? Is it vim or vi? – Peter Rincker Jul 27 '15 at 17:24
  • $ echo $EDITOR return an empty line?!?!?! – sensorario Aug 18 '15 at 13:04
  • 1
    git config --global core.editor vim works for me – eseceve Oct 8 '15 at 14:57
  • 1
    It looks like you're running vim as vi, which means it disables a bunch of features. Try export EDITOR=vim and run git commit again. – Martin Tournoij Oct 8 '15 at 16:23

The error comes from the fact that Vundle isn't installed on your vagrant VM.

You should connect to your VM, issue the following command:

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

And issue :PluginInstall in vim on your VM.

I think it is possible to use puppet to pre-configure your vagrant installation to include Vundle but I never tried it; I always do it manually.

Also you might be interested in a scrip like this one to get inspiration on how to automatically add Vundle to a fresh install (as said in the article linked on top of the page the script works only with an empty .vimrc. I give you this link only as an inspiration).

  • But Vundle is installed :-/. Vim works, I am working with Vim!! And I work inside vagrant machine. – sensorario Jul 27 '15 at 17:03
  • Oh I'm sorry I didn't understand that, my bad. Peter's comment on your question might be a better approach then. – statox Jul 27 '15 at 17:56
  • Why is this marked as the right answer, in regard to the above comments? This is confusing for visitors. – LeonardChallis Jun 5 '17 at 10:16

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.