Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
#!/usr/bin/env ruby require '/Applications/TextMate.app/Contents/SharedSupport/Support/lib/plist' ARGV.each do |file| plist = PropertyList.load(open(file)) name = plist['name'] tabTrigger = Regexp::escape(plist['tabTrigger'].to_s) if name =~ /\A(.+)\b\s+\(#{tabTrigger}\)(.*)\z/ then plist['name'] = $1 + $2 PropertyList.dump(open(file, 'w'), plist) end end
From the Design Piracy series on my blog: