Skip to content
Browse files

Adding initial support for CoffeeScript file syntax highlighting.

I started off with the .js code and removed a lot of the JS basic
function definitions, took away the function keyword. Added single and
multiline commenting. Added keywords class and extends.
  • Loading branch information...
1 parent eee26a5 commit a0fcc7d09ff1076637f520799f64a5485459780f David Sowsy committed Sep 28, 2011
Showing with 104 additions and 12 deletions.
  1. +20 −12 Other/SyntaxDefinitions.plist
  2. +84 −0 Syntax Definitions/coffeescript.plist
View
32 Other/SyntaxDefinitions.plist 100644 → 100755
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
@@ -43,7 +43,7 @@
<string>run mod dat</string>
</dict>
<dict>
- <key>name</key>
+ <key>name</key>
<string>Apache</string>
<key>file</key>
<string>apache</string>
@@ -156,6 +156,14 @@
</dict>
<dict>
<key>name</key>
+ <string>CoffeeScript</string>
+ <key>file</key>
+ <string>coffeescript</string>
+ <key>extensions</key>
+ <string>coffee</string>
+ </dict>
+ <dict>
+ <key>name</key>
<string>ColdFusion</string>
<key>file</key>
<string>coldfusion</string>
@@ -203,13 +211,13 @@
<string>e</string>
</dict>
<dict>
- <key>name</key>
- <string>Erlang</string>
- <key>file</key>
- <string>erl</string>
- <key>extensions</key>
- <string>erl hrl</string>
- </dict>
+ <key>name</key>
+ <string>Erlang</string>
+ <key>file</key>
+ <string>erl</string>
+ <key>extensions</key>
+ <string>erl hrl</string>
+ </dict>
<dict>
<key>name</key>
<string>eZ Publish</string>
@@ -241,7 +249,7 @@
<string>gedcom</string>
<key>extensions</key>
<string>ged</string>
- </dict>
+ </dict>
<dict>
<key>name</key>
<string>GNU Assembler</string>
@@ -530,7 +538,7 @@
<key>extensions</key>
<string>rb</string>
</dict>
- <dict>
+ <dict>
<key>name</key>
<string>Scala</string>
<key>file</key>
@@ -643,4 +651,4 @@
<string>xml dtd xsd xsl</string>
</dict>
</array>
-</plist>
+</plist>
View
84 Syntax Definitions/coffeescript.plist
@@ -0,0 +1,84 @@
+<?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>functionDefinition</key>
+ <string>^\s*function\s+.*\n?\s*\{</string>
+ <key>beginVariable</key>
+ <string></string>
+ <key>endInstruction</key>
+ <string></string>
+ <key>firstString</key>
+ <string>&quot;</string>
+ <key>firstSingleLineComment</key>
+ <string>#</string>
+ <key>keywordsCaseSensitive</key>
+ <false/>
+ <key>secondSingleLineComment</key>
+ <string></string>
+ <key>secondString</key>
+ <string>&apos;</string>
+ <key>endCommand</key>
+ <string></string>
+ <key>beginCommand</key>
+ <string></string>
+ <key>keywords</key>
+ <array>
+ <string>if</string>
+ <string>else</string>
+ <string>for</string>
+ <string>in</string>
+ <string>while</string>
+ <string>do</string>
+ <string>continue</string>
+ <string>break</string>
+ <string>with</string>
+ <string>try</string>
+ <string>catch</string>
+ <string>switch</string>
+ <string>case</string>
+ <string>new</string>
+ <string>var</string>
+ <string>return</string>
+ <string>delete</string>
+ <string>true</string>
+ <string>false</string>
+ <string>void</string>
+ <string>throw</string>
+ <string>typeof</string>
+ <string>const</string>
+ <string>default</string>
+ <string>escape</string>
+ <string>Number</string>
+ <string>window</string>
+ <string>this</string>
+ <string>call</string>
+ <string>caller</string>
+ <string>class</string>
+ <string>=&gt;</string>
+ <string>@</string>
+ <string>-&gt;</string>
+ <string>extends</string>
+ </array>
+ <key>endSecondMultiLineComment</key>
+ <string></string>
+ <key>endVariable</key>
+ <string></string>
+ <key>removeFromFunction</key>
+ <string>function </string>
+ <key>beginSecondMultiLineComment</key>
+ <string></string>
+ <key>beginFirstMultiLineComment</key>
+ <string>###</string>
+ <key>beginInstruction</key>
+ <string></string>
+ <key>endFirstMultiLineComment</key>
+ <string>###</string>
+ <key>recolourKeywordIfAlreadyColoured</key>
+ <true/>
+ <key>autocompleteWords</key>
+ <array/>
+ <key>class</key>
+ <string>class</string>
+</dict>
+</plist>

0 comments on commit a0fcc7d

Please sign in to comment.
Something went wrong with that request. Please try again.