mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
<?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 <<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>
|