Created
December 2, 2011 21:49
-
-
Save trevrosen/1424987 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Automatically insert closing parens, braces, etc | |
vim_plugin_task "autoclose", "git://github.com/Townk/vim-autoclose.git" | |
# Bunch of nice snippets for Snipmate | |
vim_plugin_task "scrooloose-snippets" do | |
snippet_dirs = %w(ruby-rspec javascript-jquery html haml) # dirs w/ snippets you want | |
storage_path = File.expand_path("~/.vim/extra_snippets", __FILE__) | |
snipmate_path = File.expand_path("~/.vim/snippets", __FILE__) | |
# Just blow it away if it's there | |
FileUtils.rm_rf(storage_path) if File.exists?(storage_path) | |
sh "git clone https://github.com/scrooloose/snipmate-snippets.git #{storage_path}" | |
Dir.entries(storage_path).each do |entry| | |
next if entry[0].chr == '.' | |
if snippet_dirs.include? entry | |
sh "cp -R #{storage_path}/#{entry} #{snipmate_path}" | |
puts "---------------------------------------------------------" | |
puts "***** '#{entry}' moved to snipMate's snippets directory" | |
puts "---------------------------------------------------------" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment