Browse Source

Merge cb9abe6203 into cfd3b2d388

pull/452/merge
Lucas Hoffmann 11 years ago
parent
commit
8fbd17bb47
2 changed files with 55 additions and 0 deletions
  1. +12
    -0
      README.md
  2. +43
    -0
      autoinstall.vim

+ 12
- 0
README.md View File

@ -38,8 +38,20 @@
2. Set up [Vundle]:
Either you install Vundle manually:
`$ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim`
or you can put these lines *before* the configureation described below:
```vim
if !filereadable(expand('~/.vim/bundle/Vundle.vim/README.md'))
source https://raw.githubusercontent.com/gmarik/Vundle.vim/master/autoinstall.vim
endif
```
NOTE: You might have to change the path in the test to suit you system.
3. Configure Plugins:
Put this at the top of your `.vimrc` to use Vundle. Remove plugins you don't need, they are for illustration purposes.


+ 43
- 0
autoinstall.vim View File

@ -0,0 +1,43 @@
" This installation script is intended to be loaded from the internet and
" sourced from your vimrc file like this:
"
" if !fileradable(expand('~/.vim/bundle/Vundle.vim/README.md'))
" source https://raw.githubusercontent.com/gmarik/Vundle.vim/master/autoinstall.vim
" endif
"
" This will load the script from github and source it. If you put the above
" lines in your vimrc file before setting up Vundle.vim you will get an
" automated installation process for every new machine you use your vimrc on.
echomsg 'Starting automatic installation of Vundle.vim.'
" the url of the Vundle.vim repository to clone
let s:clone_uri = 'https://github.com/gmarik/Vundle.vim.git'
" the path to clone Vundle.vim to
if has('unix') " we seem to be on a UNIX compatible system
let s:path = expand('~/.vim/bundle/Vundle.vim')
elseif has('win32') " we are on some variant of Windows
let s:path = expand('~/vimfiles/bundle/Vundle.vim')
else
echoerr 'Your system is not supported. Sorry.'
finish
endif
" only clone if the plugin does not yet exist on disk
if !filereadable(s:path.'/README.md')
call mkdir(s:path, 'p')
execute '!git clone' s:clone_uri s:path
if v:shell_error != 0
echoerr 'Automatic installation of Vundle.vim failed! Please install manually.'
finish
endif
endif
" use an autocmd after startup to install all plugins for the user
augroup VundleAutoInstall
autocmd!
autocmd VimEnter * PluginUpdate
augroup END
echomsg 'Installation of Vundle.vim complete. Plugins will automaticaly be installed after startup.'

Loading…
Cancel
Save