Skip to content

Instantly share code, notes, and snippets.

@trevrosen
Created December 2, 2011 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevrosen/1424987 to your computer and use it in GitHub Desktop.
Save trevrosen/1424987 to your computer and use it in GitHub Desktop.
# 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