forked from dchelimsky/rspec-tmbundle
/
Alternate File.tmCommand
33 lines (28 loc) · 1006 Bytes
/
Alternate File.tmCommand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//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 bash
. "$TM_BUNDLE_SUPPORT/lib/rvm_textmate"
cat <<'RUBYEOF' > /tmp/textmate-command-$$.rb
require ENV['TM_BUNDLE_SUPPORT'] + "/lib/spec/mate/switch_command"
Spec::Mate::SwitchCommand.new.go_to_twin(ENV['TM_PROJECT_DIRECTORY'], ENV['TM_FILEPATH'])
RUBYEOF
${TM_RUBY:-ruby} /tmp/textmate-command-$$.rb; exit_status=$?; rm /tmp/textmate-command-$$.rb; exit $exit_status</string>
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
<string>^$</string>
<key>name</key>
<string>Alternate File</string>
<key>output</key>
<string>showAsTooltip</string>
<key>scope</key>
<string>source.ruby, text.html.ruby</string>
<key>uuid</key>
<string>0C96C910-0A83-4AFE-AEF7-1F4882A00232</string>
</dict>
</plist>