Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (37 sloc) 1.03 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 ruby -wKU
require "#{ENV['TM_SUPPORT_PATH']}/lib/exit_codes"
require "#{ENV['TM_SUPPORT_PATH']}/lib/escape"
method_name = ENV["TM_SELECTED_TEXT"] || ENV["TM_CURRENT_WORD"] or
TextMate.exit_show_tool_tip(
"Please type the new function's name or use the def⇥ snippet."
)
print &lt;&lt;END_SNIPPET
def #{e_sn method_name}\${1/.+/(/}\${1:args}\${1/.+/)/}
\$0
end
END_SNIPPET
</string>
<key>fallbackInput</key>
<string>word</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>$
</string>
<key>name</key>
<string>New Method</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>scope</key>
<string>source.ruby</string>
<key>uuid</key>
<string>0275EF39-9357-408F-AF20-79E415CA9504</string>
</dict>
</plist>