1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

removing the tmbundle from the main repository. See jashkenas/coffee-script-tmbundle for the new one

This commit is contained in:
Jeremy Ashkenas 2010-03-14 08:05:33 -07:00
parent 701a5c7cb9
commit 35da6c32b7
11 changed files with 2 additions and 814 deletions

View file

@ -1,28 +0,0 @@
<?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>cat &lt;&lt;SNIPPET
${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}: (\${1:args}) -&gt;
\$0
SNIPPET</string>
<key>fallbackInput</key>
<string>word</string>
<key>input</key>
<string>selection</string>
<key>keyEquivalent</key>
<string>$ </string>
<key>name</key>
<string>New Function</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>scope</key>
<string>source.coffee</string>
<key>uuid</key>
<string>C5717DF2-7113-472F-B1AD-4623480C578A</string>
</dict>
</plist>

View file

@ -1,54 +0,0 @@
<?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>commands</key>
<array>
<dict>
<key>command</key>
<string>moveRightAndModifySelection:</string>
</dict>
<dict>
<key>argument</key>
<dict>
<key>action</key>
<string>replaceAll</string>
<key>findInProjectIgnoreCase</key>
<false/>
<key>findString</key>
<string>((?m:.){2,})|\}|([^}])</string>
<key>ignoreCase</key>
<false/>
<key>regularExpression</key>
<true/>
<key>replaceAllScope</key>
<string>selection</string>
<key>replaceString</key>
<string>$1}$2</string>
<key>wrapAround</key>
<false/>
</dict>
<key>command</key>
<string>findWithOptions:</string>
</dict>
<dict>
<key>command</key>
<string>moveLeft:</string>
</dict>
<dict>
<key>command</key>
<string>moveRight:</string>
</dict>
</array>
<key>keyEquivalent</key>
<string>}</string>
<key>name</key>
<string>Overwrite '}' in ${ .. }</string>
<key>scope</key>
<string>source.coffee string.quoted.double source.coffee.embedded</string>
<key>scopeType</key>
<string>local</string>
<key>uuid</key>
<string>D7ADBF4B-B25B-4CF6-8FC0-C4FB0C3DBE64</string>
</dict>
</plist>

View file

@ -1,24 +0,0 @@
<?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>name</key>
<string>comments</string>
<key>scope</key>
<string>source.coffee</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string># </string>
</dict>
</array>
</dict>
<key>uuid</key>
<string>0A92C6F6-4D73-4859-B38C-4CC19CBC191F</string>
</dict>
</plist>

View file

@ -1,26 +0,0 @@
<?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>name</key>
<string>Indent</string>
<key>scope</key>
<string>source.coffee</string>
<key>settings</key>
<dict>
<key>decreaseIndentPattern</key>
<string>^\s*(\}|\])$</string>
<key>increaseIndentPattern</key>
<string>(?x)
^\s*
(.*class
|[a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)&gt;\s*$)) # function that is not one line
|[a-zA-Z\$_](\w|\$|\.)*\s*(?=(?!\::)\:(?!(\s*\(.*\))?\s*((=|-)&gt;))):\s*((if|while)(?!.*?then)|for|$) # assignment using multiline if/while/for
|(if|while)(?!.*?then)|for
|.*\{$
|.*\[$)</string>
</dict>
<key>uuid</key>
<string>C5D6C716-12FE-4CE8-A916-6CABEDE8AFE7</string>
</dict>
</plist>

View file

@ -1,19 +0,0 @@
<?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>name</key>
<string>Symbol List: Method</string>
<key>scope</key>
<string>source.coffee meta.function</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>symbolTransformation</key>
<string>s/^(\s*)([a-zA-Z\$_](\w|\$|:|\.))*\s*:/$1$2/</string>
</dict>
<key>uuid</key>
<string>419D24D8-0DD6-4D9A-8CA0-6D9CD740BEEC</string>
</dict>
</plist>

View file

@ -1,17 +0,0 @@
<?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>name</key>
<string>Symbol List: Method Instance</string>
<key>scope</key>
<string>source.coffee entity.name.type.instance</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>0</integer>
</dict>
<key>uuid</key>
<string>B087AF2F-8946-4EA9-8409-49E7C4A2EEF0</string>
</dict>
</plist>

View file

@ -1,16 +0,0 @@
<?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>content</key>
<string>\${${1:$TM_SELECTED_TEXT}}</string>
<key>keyEquivalent</key>
<string>$</string>
<key>name</key>
<string>Embedded Code — ${…}</string>
<key>scope</key>
<string>string.quoted.double.coffee - string source</string>
<key>uuid</key>
<string>17C8BFF6-25F2-4F00-8E7E-768D3D186A23</string>
</dict>
</plist>

View file

@ -1,19 +0,0 @@
<?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>content</key>
<string>${1:function_name}: (${2:argument}) -&gt;
${0:# body...}
</string>
<key>name</key>
<string>Function</string>
<key>scope</key>
<string>source.coffee</string>
<key>tabTrigger</key>
<string>fun</string>
<key>uuid</key>
<string>F2E2E79A-A85D-471D-9847-72AE40205942</string>
</dict>
</plist>

View file

@ -1,582 +0,0 @@
<?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>comment</key>
<string>CoffeeScript Syntax: version 1</string>
<key>fileTypes</key>
<array>
<string>coffee</string>
<string>Cakefile</string>
</array>
<key>foldingStartMarker</key>
<string>^.*[:=] \{[^\}]*$</string>
<key>foldingStopMarker</key>
<string>\s*\}</string>
<key>keyEquivalent</key>
<string>^~C</string>
<key>name</key>
<string>CoffeeScript</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>variable.parameter.function.coffee</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>variable.parameter.function.coffee</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>variable.parameter.function.coffee</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>storage.type.function.coffee</string>
</dict>
</dict>
<key>comment</key>
<string>match stuff like: a -&gt; … </string>
<key>match</key>
<string>(\()([a-zA-Z0-9_?.\$]*(,\s*[a-zA-Z0-9_?.\$]+)*)(\))\s*((=|-)&gt;)</string>
<key>name</key>
<string>meta.inline.function.coffee</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.new.coffee</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.type.instance.coffee</string>
</dict>
</dict>
<key>match</key>
<string>(new)\s+(\w+(?:\.\w*)?)</string>
<key>name</key>
<string>meta.class.instance.constructor</string>
</dict>
<dict>
<key>begin</key>
<string>("""|''')</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.coffee</string>
</dict>
</dict>
<key>end</key>
<string>("""|''')</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.coffee</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.heredoc.coffee</string>
</dict>
<dict>
<key>begin</key>
<string>`</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.coffee</string>
</dict>
</dict>
<key>end</key>
<string>`</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.coffee</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.script.coffee</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)</string>
<key>name</key>
<string>constant.character.escape.coffee</string>
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.coffee</string>
</dict>
</dict>
<key>match</key>
<string>(#).*$\n?</string>
<key>name</key>
<string>comment.line.coffee</string>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=[=(:\s]|^|return)\s*(/)(?![\s/*+{}?])</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.coffee</string>
</dict>
</dict>
<key>end</key>
<string>(/)[igmy]*</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.coffee</string>
</dict>
</dict>
<key>name</key>
<string>string.regexp.coffee</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\.</string>
<key>name</key>
<string>constant.character.escape.coffee</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_coffee</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>\b(break|by|catch|continue|else|finally|for|in|of|if|return|switch|then|throw|try|unless|when|while)\b</string>
<key>name</key>
<string>keyword.control.coffee</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>variable.assignment.coffee</string>
</dict>
</dict>
<key>match</key>
<string>(?=[a-zA-Z\$_])([a-zA-Z\$_](\w|\$|\.)*\s*(?=(?!\::)\:(?!(\s*\(.*\))?\s*((=|-)&gt;))))</string>
<key>name</key>
<string>variable.assignment.coffee</string>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=\s|^)(\[)(?=.*?\]\s*:)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.coffee</string>
</dict>
</dict>
<key>end</key>
<string>(\]\s*:)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.coffee</string>
</dict>
</dict>
<key>name</key>
<string>meta.variable.assignment.destructured.coffee</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#variable_name</string>
</dict>
<dict>
<key>include</key>
<string>#instance_variable</string>
</dict>
<dict>
<key>include</key>
<string>#single_quoted_string</string>
</dict>
<dict>
<key>include</key>
<string>#double_quoted_string</string>
</dict>
<dict>
<key>include</key>
<string>#numeric</string>
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.function.coffee</string>
</dict>
</dict>
<key>match</key>
<string>(\s*)(?=[a-zA-Z\$_])([a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)&gt;)))</string>
<key>name</key>
<string>meta.function.coffee</string>
</dict>
<dict>
<key>match</key>
<string>(=|-)&gt;</string>
<key>name</key>
<string>storage.type.function.coffee</string>
</dict>
<dict>
<key>match</key>
<string>\b(true|on|yes)\b</string>
<key>name</key>
<string>constant.language.boolean.true.coffee</string>
</dict>
<dict>
<key>match</key>
<string>\b(false|off|no)\b</string>
<key>name</key>
<string>constant.language.boolean.false.coffee</string>
</dict>
<dict>
<key>match</key>
<string>\bnull\b</string>
<key>name</key>
<string>constant.language.null.coffee</string>
</dict>
<dict>
<key>match</key>
<string>\b(super|this|extends)\b</string>
<key>name</key>
<string>variable.language.coffee</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.type.class.coffee</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.type.class.coffee</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>entity.other.inherited-class.coffee</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>keyword.control.inheritance.coffee</string>
</dict>
</dict>
<key>match</key>
<string>(class)\s+([a-zA-Z\$_]\w+)(\s+(extends)\s+[a-zA-Z\$_]\w*)?</string>
<key>name</key>
<string>meta.class.coffee</string>
</dict>
<dict>
<key>match</key>
<string>\b(debugger|\\)\b</string>
<key>name</key>
<string>keyword.other.coffee</string>
</dict>
<dict>
<key>match</key>
<string>!|%|&amp;|\*|\/|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|&lt;=|&gt;=|&lt;&lt;=|&gt;&gt;=|&gt;&gt;&gt;=|&lt;&gt;|&lt;|&gt;|!|&amp;&amp;|\?|\|\||\:|\*=|(?&lt;!\()/=|%=|\+=|\-=|&amp;=|\^=|\b(instanceof|new|delete|typeof|and|or|is|isnt|not)\b</string>
<key>name</key>
<string>keyword.operator.coffee</string>
</dict>
<dict>
<key>match</key>
<string>\b(Infinity|NaN|undefined)\b</string>
<key>name</key>
<string>constant.language.coffee</string>
</dict>
<dict>
<key>match</key>
<string>\;</string>
<key>name</key>
<string>punctuation.terminator.statement.coffee</string>
</dict>
<dict>
<key>match</key>
<string>,[ |\t]*</string>
<key>name</key>
<string>meta.delimiter.object.comma.coffee</string>
</dict>
<dict>
<key>match</key>
<string>\.</string>
<key>name</key>
<string>meta.delimiter.method.period.coffee</string>
</dict>
<dict>
<key>match</key>
<string>\{|\}</string>
<key>name</key>
<string>meta.brace.curly.coffee</string>
</dict>
<dict>
<key>match</key>
<string>\(|\)</string>
<key>name</key>
<string>meta.brace.round.coffee</string>
</dict>
<dict>
<key>match</key>
<string>\[|\]\s*</string>
<key>name</key>
<string>meta.brace.square.coffee</string>
</dict>
<dict>
<key>include</key>
<string>#instance_variable</string>
</dict>
<dict>
<key>include</key>
<string>#single_quoted_string</string>
</dict>
<dict>
<key>include</key>
<string>#double_quoted_string</string>
</dict>
<dict>
<key>include</key>
<string>#numeric</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>double_quoted_string</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>"</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.coffee</string>
</dict>
</dict>
<key>end</key>
<string>"</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.coffee</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.double.coffee</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)</string>
<key>name</key>
<string>constant.character.escape.coffee</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_coffee</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>instance_variable</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(@)([a-zA-Z_\$]\w*)?</string>
<key>name</key>
<string>variable.other.readwrite.instance.coffee</string>
</dict>
</array>
</dict>
<key>interpolated_coffee</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\$\{</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.embedded.coffee</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>name</key>
<string>source.coffee.embedded.source</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.variable.coffee</string>
</dict>
</dict>
<key>match</key>
<string>(\$)@[a-zA-Z_]\w*(\.\w+)*</string>
<key>name</key>
<string>variable.other.readwrite.coffee</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.variable.coffee</string>
</dict>
</dict>
<key>match</key>
<string>(\$)(?!@)[a-zA-Z_]\w*(\.\w+)*</string>
<key>name</key>
<string>source.coffee.embedded.source</string>
</dict>
</array>
</dict>
<key>numeric</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(?&lt;!\$)\b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?(e[+\-]?[0-9]+)?))\b</string>
<key>name</key>
<string>constant.numeric.coffee</string>
</dict>
</array>
</dict>
<key>single_quoted_string</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>'</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.coffee</string>
</dict>
</dict>
<key>end</key>
<string>'</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.coffee</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.single.coffee</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)</string>
<key>name</key>
<string>constant.character.escape.coffee</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>variable_name</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>variable.assignment.coffee</string>
</dict>
</dict>
<key>match</key>
<string>([a-zA-Z\$_]\w*(\.\w+)*)</string>
<key>name</key>
<string>variable.assignment.coffee</string>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>source.coffee</string>
<key>uuid</key>
<string>5B520980-A7D5-4E10-8582-1A4C889A8DE5</string>
</dict>
</plist>

View file

@ -1,22 +0,0 @@
<?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>name</key>
<string>CoffeeScript</string>
<key>ordering</key>
<array>
<string>5B520980-A7D5-4E10-8582-1A4C889A8DE5</string>
<string>17C8BFF6-25F2-4F00-8E7E-768D3D186A23</string>
<string>C5D6C716-12FE-4CE8-A916-6CABEDE8AFE7</string>
<string>D7ADBF4B-B25B-4CF6-8FC0-C4FB0C3DBE64</string>
<string>419D24D8-0DD6-4D9A-8CA0-6D9CD740BEEC</string>
<string>B087AF2F-8946-4EA9-8409-49E7C4A2EEF0</string>
<string>0A92C6F6-4D73-4859-B38C-4CC19CBC191F</string>
<string>C5717DF2-7113-472F-B1AD-4623480C578A</string>
<string>F2E2E79A-A85D-471D-9847-72AE40205942</string>
</array>
<key>uuid</key>
<string>A46E4382-F1AC-405B-8F22-65FF470F34D7</string>
</dict>
</plist>

View file

@ -6,13 +6,8 @@ inline script tags of type "text/coffeescript" on the page. It will compile
and evaluate all of the scripts in order.
This folder also includes rough cuts of CoffeeScript syntax highlighters for
TextMate and Vim. Improvements to their lexing ability are always welcome.
To install the TextMate bundle, drop it into:
~/Library/Application Support/TextMate/Bundles
To install the Vim highlighter, copy "coffee.vim" into the "syntax" directory of
This folder also includes a CoffeeScript syntax highlighter for Vim.
To install, copy "coffee.vim" into the "syntax" directory of
your vim72, and enable it in either of the following two ways:
* Manually, by running `:set syntax=coffee`