Commits

Ondrej Platek committed 8bb1ec9

fix the vimrc

Comments (0)

Files changed (1)

 " no vi-compatible
 set nocompatible
 
+" Setting up Vundle - the vim plugin bundler
+let s:vundle_readme=expand(printf('%s/bundle/vundle/README.md', s:portable))
+let s:bundle_dir = s:portable . '/bundle'
+let s:vundle_dir = s:bundle_dir . '/vundle'
+if !filereadable(s:vundle_readme)
+  echo "Installing Vundle..."
+  echo "Type :BundleInstall for installing the plugins"
+  execute 'silent !mkdir -p ' . s:bundle_dir
+  execute 'silent !git clone https://github.com/gmarik/vundle ' . s:vundle_dir
+endif
+
 " required for vundle
 filetype off
 
-" set the runtime path to include Vundle and initialize
-set rtp+=~/.vim/bundle/vundle/
-call vundle#rc()
-" alternatively, pass a path where Vundle should install plugins
-"let path = '~/some/path/here'
-"call vundle#rc(path)
-
+" add the bundle directory to 'runtimepath'
+let &runtimepath = printf('%s/bundle/vundle,%s', s:portable, &runtimepath)
+call vundle#rc(s:bundle_dir)
 
 " let Vundle manage Vundle
 " required!
 Bundle 'tpope/vim-eunuch'
 Bundle 'tpope/vim-git'
 Bundle 'tpope/vim-markdown'
-Bundle 'tpope/vim-surround' "TODO how to use it
+Bundle 'tpope/vim-surround' 
 Bundle 'vim-scripts/matchit.zip'
 Bundle 'SirVer/ultisnips'
 Bundle 'scrooloose/syntastic'