Unknown function: vundle#begin
Asked Answered
D

4

37

I had old vundle installed. Instead of using git pull to update vundle, I removed old vundle from ~/.vim and installed it following Quick Start section in the Github page of vundle.

Maybe I broke something when I installed new vundle. I get this:

jack@Jack-PC ~ $ vim .vimrc
Error detected while processing /home/jack/.vimrc:
line    6:
E117: Unknown function: vundle#begin
line   15:
E117: Unknown function: vundle#end
Press ENTER or type command to continue

I followed the instructions on the Github page exactly.

" .vimrc
set nocompatible
filetype off 

" Vundle 
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"
"" Vundle Plugins List
"Plugin 'gmarik/Vundle.vim'
"Plugin 'php.vim'
"Plugin 'neocomplcache'
"Plugin 'rails.vim'
"Plugin 'bling/vim-airline'
"
call vundle#end()
filetype plugin indent on
Deaver answered 22/8, 2014 at 10:16 Comment(0)
H
25

maybe the rtp location is wrong,you can type

:echo &rtp  

in Vim to see whether the location of ~ stand for is correct.

you can replace

set rtp+=~/.vim/bundle/Vundle.vim

to

set rtp+=/home/[YourUserName]/.vim/bundle/Vundle.vim   //do not use ~
Headmost answered 26/1, 2015 at 4:38 Comment(2)
Thanks, this worked. For gVim users: set rtp+=~/vimfiles/bundle/Vundle.vimFilum
Amazing solution. Looks like this is usually the case when setting up .vimrc files in remote linux servers with multiple users.Peaslee
L
64

Your .vimrc seems fine. Looks like you have not installed the vundle plugin properly. Run this command on your console.

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

You should have a directory structure like (I simplified it):

~/.vim
├── bundle/
│   └── Vundle.vim  <------------------ Vundle
├── colors/
│   └── Tomorrow.vim
└── plugin/
    └── acp.vim
Ligamentous answered 22/8, 2014 at 10:48 Comment(2)
What is the difference between your answer and git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim?Arondell
This worked for me, I ran into this issue after copying my .vimrc from one computer to another.Bounty
H
25

maybe the rtp location is wrong,you can type

:echo &rtp  

in Vim to see whether the location of ~ stand for is correct.

you can replace

set rtp+=~/.vim/bundle/Vundle.vim

to

set rtp+=/home/[YourUserName]/.vim/bundle/Vundle.vim   //do not use ~
Headmost answered 26/1, 2015 at 4:38 Comment(2)
Thanks, this worked. For gVim users: set rtp+=~/vimfiles/bundle/Vundle.vimFilum
Amazing solution. Looks like this is usually the case when setting up .vimrc files in remote linux servers with multiple users.Peaslee
S
1

I met this issue again. After checked, the reason why is that there is more than one bundle environment in computer, you can :echo &rtp, and see other environment, and remove other bundle directory.

Sate answered 15/12, 2015 at 13:48 Comment(0)
W
0

I think the best answer is:

set rtp+=$HOME/.vim/bundle/Vundle.vim " in OS X

of course, you can find out: echo $HOME, is it your home directory or not.

Whimper answered 9/9, 2016 at 3:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.