pmdaly
pmdaly

Reputation: 1222

(Vim) - Can't get Vundle plugin to work - Unknown function

I followed this installation guide:

https://github.com/gmarik/Vundle.vim/wiki/Vundle-for-Windows

Curl and git are installed correctly but there's a problem with vundle. I honestly have no idea where the problem could be.

Here are the error's that I get when loading vim:

Error detected while processing C:\SPB_Data\_vimrc
line 7:
E117: Uknown function: vundle#begin
line 10:
E492: Not an editor command: Plugin 'gmarik/Vundle.vim'
line 15:
E492: Not an editor command: Plugin 'tpope/vim-fugitive'
line 18:
E117: Unknown function: vundle#end
"

Here is my _vimrc:

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/vimfiles/bundle/Vundle/
let path='~/vimfiles/bundle'
call vundle#begin(path)

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

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

set textwidth=79  " lines longer than 79 columns will be broken
set shiftwidth=4  " operation >> indents 4 columns; << unindents 4 columns
set tabstop=4     " a hard TAB displays as 4 columns
set expandtab     " insert spaces when hitting TABs
set softtabstop=4 " insert/delete 4 spaces when hitting a TAB/BACKSPACE
set shiftround    " round indent to multiple of 'shiftwidth'
set autoindent    " align the new line indent with the previous line
set showcmd     " show last command entered in the bottom bar
set cursorline    " highlist current line
set wildmenu    " visual complete

if has("gui_running")
  " GUI is running or is about to start.
  " Maximize gvim window.
  set lines=999 columns=999
else
  " This is console Vim.
  if exists("+lines")
    set lines=50
  endif
  if exists("+columns")
    set columns=80
  endif
endif

If anyone can help I would greatly appreciate it. I'm sure it's something small that I'm missing but I'm not sure what it is and I've found online hasn't fixed it.

Edit: Solved: Apparently windows won't expand the ~\ so it must be vimfiles. Everything works now.

Upvotes: 1

Views: 6470

Answers (2)

Yevhen Surzhenko
Yevhen Surzhenko

Reputation: 11

{`set nocompatible " be iMproved, required
filetype off     " required
" set the runtime path to include Vundle and initialize
set rtp+=~/vimfiles/bundle/Vundle.vim
call vundle#begin('/c/users/admin/vimfiles/bundle/Vundle.vim/ftplugin')}

This is how I solved the problem when I installed Plugin in Vundle. (For Windows)

Maybe it can help somebody.

Upvotes: 1

gsbabil
gsbabil

Reputation: 7703

The following works on both Windows, Linux and Mac for me.

set nocompatible
set rtp+=$HOME/.vim/bundle/vundle
let path='$HOME/.vim/bundle'
call vundle#rc('$HOME/.vim/bundle')

This assumes that:

  • You have a .vim directory at C:\Users\user-name\.vim
  • You have .vimrc inside C:\Users\user-name\.vimrc
  • Create a directory called bundle at C:\Users\user-name\.vim\bundle
  • Navigate to C:\Users\user-name\.vim\bundle on command prompt, and run:

git clone https://github.com/gmarik/Vundle.vim.git vundle

  • Now run vim from command-line and run :BundleInstall

Upvotes: 4

Related Questions