Skip to content

Instantly share code, notes, and snippets.

@rhysd
Created September 6, 2016 08:50
Show Gist options
  • Save rhysd/2d16937e516a4c4ea045453d5a22fa6b to your computer and use it in GitHub Desktop.
Save rhysd/2d16937e516a4c4ea045453d5a22fa6b to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby -rfileutils
Dir["#{ENV['HOME']}/.vim/undo/*"]
.reject{|f| File.exists? File.basename(f).gsub('%', '/')}
.each{|f| FileUtils.remove_file f}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment