Debian Codegraph @

editors/Stylus.tmbundle/Commands/Compile and Display CSS.tmCommand

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 <plist version="1.0">
4 <dict>
5 <key>beforeRunningCommand</key>
6 <string>nop</string>
7 <key>command</key>
8 <string>#!/bin/bash
9
10 function highlight {
11 test `which pygmentize`
12 if [[ $? -eq 0 ]]; then
13 pygmentize -Onoclasses,nobackground=True -l css -f html
14 else
15 pre
16 fi
17 }
18
19 function pre {
20 echo -n '<pre style="word-wrap: break-word;">'
21 perl -pe '$| = 1; s/&/&amp;/g; s/</&lt;/g; s/>/&gt;/g; s/$\\n/<br>/'
22 echo '</pre>'
23 }
24
25 cd $TM_DIRECTORY
26 ${TM_STYLUS:=stylus} | highlight</string>
27 <key>input</key>
28 <string>selection</string>
29 <key>keyEquivalent</key>
30 <string>@b</string>
31 <key>name</key>
32 <string>Compile and Display CSS</string>
33 <key>output</key>
34 <string>showAsHTML</string>
35 <key>scope</key>
36 <string>source.stylus</string>
37 <key>uuid</key>
38 <string>DD8F8C2B-2B83-4734-82EE-8508EE344638</string>
39 </dict>
40 </plist>