forked from jashkenas/coffee-script-tmbundle
/
Run.tmCommand
32 lines (29 loc) · 819 Bytes
/
Run.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
<?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>#!/bin/bash
function pre {
echo -n '<pre style="word-wrap: break-word;">'
perl -pe '$| = 1; s/&/&amp;/g; s/</&lt;/g; s/>/&gt;/g; s/$\\n/<br>/'
echo '</pre>'
}
${TM_COFFEE:=coffee} -s | pre
</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>@r</string>
<key>name</key>
<string>Run</string>
<key>output</key>
<string>showAsHTML</string>
<key>scope</key>
<string>source.coffee</string>
<key>uuid</key>
<string>30395DAB-44A6-44F7-99E1-02D64621303A</string>
</dict>
</plist>