-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvim-bundler
executable file
·46 lines (40 loc) · 1.57 KB
/
vim-bundler
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env ruby
# Very lightly adapted from a blog post by Tammer Saleh:
# http://tammersaleh.com/posts/the-modern-vim-config-with-pathogen
#
# In a nutshell, these are my favorite Vim add-ons, I moved the file to my
# personal bin/ (and thus deal with where to put the bundles differently),
# and in order to avoid dealing with Vim.org, I moved a ton of things into
# a Github repo of my own
git_bundles = [
"git://github.com/timcharper/textile.vim.git",
"git://github.com/tpope/vim-fugitive.git",
"git://github.com/tpope/vim-git.git",
"git://github.com/tpope/vim-rails.git",
"git://github.com/tpope/vim-abolish.git",
"http://github.com/tpope/vim-liquid",
"git://github.com/tpope/vim-repeat.git",
"git://github.com/tpope/vim-surround.git",
"git://github.com/tpope/vim-vividchalk.git",
"git://github.com/tpope/vim-endwise.git",
"git://github.com/tpope/vim-pastie.git",
"git://github.com/tpope/vim-unimpaired.git",
"git://github.com/vim-ruby/vim-ruby.git",
"git://github.com/telemachus/vim-varia.git",
"git://github.com/Raimondi/delimitMate.git",
"git://github.com/nanotech/jellybeans.vim.git",
"git://github.com/telemachus/rvm.vim",
"git://github.com/telemachus/vim-perlbrew.git"
]
require 'fileutils'
require 'open-uri'
bundles_dir = File.join(ENV['HOME'],".vim", "bundle")
FileUtils.cd(bundles_dir)
puts "Trashing everything (lookout!)"
Dir["*"].each {|d| FileUtils.rm_rf d }
git_bundles.each do |url|
dir = url.split('/').last.sub(/\.git$/, '')
puts " Unpacking #{url} into #{dir}"
`git clone #{url} #{dir}`
FileUtils.rm_rf(File.join(dir, ".git"))
end