Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (32 sloc) 1.02 KB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby18
text = STDIN.read
text.gsub!(/(\([^\)]+)\s+(\*\))/, '\1\2')
offset_to_first_colon = text.index(':')
argument_triplets = text.scan /(.+?):\s*\((.+?)\)\s*([^\s]*)\s*/
print(argument_triplets.collect do |triplet|
sprintf "%#{offset_to_first_colon}s:(%s)%s", triplet[0], triplet[1], triplet[2]
end.join("\n"))
print $1 if text.match /(\n+)\z/</string>
<key>fallbackInput</key>
<string>scope</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>^q</string>
<key>name</key>
<string>Reformat Method Signature</string>
<key>output</key>
<string>replaceSelectedText</string>
<key>scope</key>
<string>meta.function.objc</string>
<key>uuid</key>
<string>122E10C1-DFA2-4A9E-9B17-8EBFA6E10CC7</string>
</dict>
</plist>