Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Literate CoffeeScript for SublimeText
<?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>fileTypes</key>
<array>
<string>coffee.md</string>
<string>litcoffee</string>
</array>
<key>foldingStartMarker</key>
<string>(?x)
(&lt;(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?&gt;
|&lt;!--(?!.*--&gt;)
|\{\s*($|\?&gt;\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
)</string>
<key>foldingStopMarker</key>
<string>(?x)
(&lt;/(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)&gt;
|^\s*--&gt;
|(^|\s)\}
)</string>
<key>name</key>
<string>CoffeeScript (Literate)</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>^(?=&lt;(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b)(?!.*?&lt;/\1&gt;)</string>
<key>end</key>
<string>(?&lt;=^&lt;/\1&gt;$\n)</string>
<key>name</key>
<string>meta.content.markup</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>text.html.basic</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>^(?=([ ]{4}|\t)(?!$))</string>
<key>end</key>
<string>^(?!([ ]{4}|\t))</string>
<key>name</key>
<string>meta.content.literate</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.coffee</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?x)^
(?= [ ]{,3}&gt;.
| [a-zA-Z\d_*`\[]
| [#]{1,6}\s*+
| [ ]{,3}(?&lt;marker&gt;[-*_])([ ]{,2}\k&lt;marker&gt;){2,}[ \t]*+$
)</string>
<key>end</key>
<string>(?x)^
(?! [ ]{,3}&gt;.
| [a-zA-Z\d_*`\[]
| [#]{1,6}\s*+
| [ ]{,3}(?&lt;marker&gt;[-*_])([ ]{,2}\k&lt;marker&gt;){2,}[ \t]*+$
)</string>
<key>name</key>
<string>meta.content.markdown</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>text.html.markdown</string>
</dict>
</array>
</dict>
</array>
<key>scopeName</key>
<string>source.litcoffee</string>
<key>uuid</key>
<string>8879F3A0-2C7B-11E3-8175-0800200C9A66</string>
</dict>
</plist>

nice work, but how to use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment