Browse files

Initial Commit

  • Loading branch information...
0 parents commit 0ca5f06458537103bca1612ecba0178d979ccf76 atomi committed Jan 7, 2012
2 .gitignore
@@ -0,0 +1,2 @@
+*.cache
+*.pyc
13 Coldfusion.sublime-completions
@@ -0,0 +1,13 @@
+{
+ "scope": "text.html.cfm, text.html - source - meta.tag, punctuation.definition.tag.begin" ,
+
+ "completions":
+ [
+ { "trigger": "cfset", "contents": "<cfset $1 />" },
+ { "trigger": "cfoutput", "contents": "<cfoutput>${0:selection}</cfoutput>" },
+ { "trigger": "cfscript", "contents": "<cfscript>${0:selection}</cfscript>" },
+ { "trigger": "cfdump", "contents": "<cfdump var=\"#${1:selection}#\" >" }
+ ]
+}
+
+
78 Default (Linux).sublime-keymap
@@ -0,0 +1,78 @@
+[
+ // Ctrl+Shift+O <cfoutput></cfoutput>
+ {
+ "keys": ["ctrl+shift+o"], "command": "insert_snippet",
+ "args": { "name": "Packages/User/Coldfusion/Snippets/cfoutput.sublime-snippet" },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // Ctrl+Alt+R <cfscript></cfscript>
+ {
+ "keys": ["ctrl+alt+r"], "command": "insert_snippet",
+ "args": { "name": "Packages/User/Coldfusion/Snippets/cfscript.sublime-snippet" },
+ "context": [{ "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // Ctrl+Alt+D <cfdump var="##">
+ {
+ "keys": ["ctrl+alt+d"], "command": "insert_snippet",
+ "args": { "name": "Packages/User/Coldfusion/Snippets/cfdump.sublime-snippet" },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // Ctrl+Shift+M ColdFusion Comment <!--- --->
+ {
+ "keys": ["ctrl+shift+m"], "command": "toggle_comment",
+ "args": { "block": true },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // Pound/hash marks ##
+ {
+ "keys": ["#"], "command": "insert_snippet",
+ "args": {"contents": "#$0#"},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ // optional following_text and preceeding_text regex
+ { "key": "following_text", "operator": "regex_contains", "operand": "", "match_all": true },
+ { "key": "preceding_text", "operator": "not_regex_contains", "operand": "=\"", "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ },
+ // Pound/hash marks ## wrap selection
+ {
+ "keys": ["#"], "command": "insert_snippet",
+ "args": {"contents": "#${0:$SELECTION}#"},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ },
+ // Pound/hash marks ## move cursor forward
+ {
+ "keys": ["#"], "command": "move",
+ "args": {"by": "characters", "forward": true},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "following_text", "operator": "regex_contains", "operand": "^#", "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ },
+ // Pound/hash marks ## backsapce remove both
+ {
+ "keys": ["backspace"], "command": "run_macro_file",
+ "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "#$", "match_all": true },
+ { "key": "following_text", "operator": "regex_contains", "operand": "^#", "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ }
+ // end
+
+]
78 Default (OSX).sublime-keymap
@@ -0,0 +1,78 @@
+[
+ // super+Shift+O <cfoutput></cfoutput>
+ {
+ "keys": ["super+shift+o"], "command": "insert_snippet",
+ "args": { "name": "Packages/User/Coldfusion/Snippets/cfoutput.sublime-snippet" },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // super+Alt+R <cfscript></cfscript>
+ {
+ "keys": ["super+alt+r"], "command": "insert_snippet",
+ "args": { "name": "Packages/User/Coldfusion/Snippets/cfscript.sublime-snippet" },
+ "context": [{ "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // super+Alt+D <cfdump var="##">
+ {
+ "keys": ["super+alt+d"], "command": "insert_snippet",
+ "args": { "name": "Packages/User/Coldfusion/Snippets/cfdump.sublime-snippet" },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // super+Shift+M ColdFusion Comment <!--- --->
+ {
+ "keys": ["super+shift+m"], "command": "toggle_comment",
+ "args": { "block": true },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // Pound/hash marks ##
+ {
+ "keys": ["#"], "command": "insert_snippet",
+ "args": {"contents": "#$0#"},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ // optional following_text and preceeding_text regex
+ { "key": "following_text", "operator": "regex_contains", "operand": "", "match_all": true },
+ { "key": "preceding_text", "operator": "not_regex_contains", "operand": "=\"", "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ },
+ // Pound/hash marks ## wrap selection
+ {
+ "keys": ["#"], "command": "insert_snippet",
+ "args": {"contents": "#${0:$SELECTION}#"},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ },
+ // Pound/hash marks ## move cursor forward
+ {
+ "keys": ["#"], "command": "move",
+ "args": {"by": "characters", "forward": true},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "following_text", "operator": "regex_contains", "operand": "^#", "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ },
+ // Pound/hash marks ## backsapce remove both
+ {
+ "keys": ["backspace"], "command": "run_macro_file",
+ "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "#$", "match_all": true },
+ { "key": "following_text", "operator": "regex_contains", "operand": "^#", "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ }
+ // end
+
+]
78 Default (Windows).sublime-keymap
@@ -0,0 +1,78 @@
+[
+ // Ctrl+Shift+O <cfoutput></cfoutput>
+ {
+ "keys": ["ctrl+shift+o"], "command": "insert_snippet",
+ "args": { "name": "Packages/User/Coldfusion/Snippets/cfoutput.sublime-snippet" },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // Ctrl+Alt+R <cfscript></cfscript>
+ {
+ "keys": ["ctrl+alt+r"], "command": "insert_snippet",
+ "args": { "name": "Packages/User/Coldfusion/Snippets/cfscript.sublime-snippet" },
+ "context": [{ "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // Ctrl+Alt+D <cfdump var="##">
+ {
+ "keys": ["ctrl+alt+d"], "command": "insert_snippet",
+ "args": { "name": "Packages/User/Coldfusion/Snippets/cfdump.sublime-snippet" },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // Ctrl+Shift+M ColdFusion Comment <!--- --->
+ {
+ "keys": ["ctrl+shift+m"], "command": "toggle_comment",
+ "args": { "block": true },
+ "context": [ {"key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }]
+ },
+ // Pound/hash marks ##
+ {
+ "keys": ["#"], "command": "insert_snippet",
+ "args": {"contents": "#$0#"},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ // optional following_text and preceeding_text regex
+ { "key": "following_text", "operator": "regex_contains", "operand": "", "match_all": true },
+ { "key": "preceding_text", "operator": "not_regex_contains", "operand": "=\"", "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ },
+ // Pound/hash marks ## wrap selection
+ {
+ "keys": ["#"], "command": "insert_snippet",
+ "args": {"contents": "#${0:$SELECTION}#"},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ },
+ // Pound/hash marks ## move cursor forward
+ {
+ "keys": ["#"], "command": "move",
+ "args": {"by": "characters", "forward": true},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "following_text", "operator": "regex_contains", "operand": "^#", "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ },
+ // Pound/hash marks ## backsapce remove both
+ {
+ "keys": ["backspace"], "command": "run_macro_file",
+ "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"},
+ "context":
+ [
+ { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
+ { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
+ { "key": "preceding_text", "operator": "regex_contains", "operand": "#$", "match_all": true },
+ { "key": "following_text", "operator": "regex_contains", "operand": "^#", "match_all": true },
+ { "key": "selector", "operator": "equal", "operand": "text.html.cfm", "match_all": true }
+ ]
+ }
+ // end
+
+]
30 Preferences/CFScriptComments.tmPreferences
@@ -0,0 +1,30 @@
+<?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">
+<plist version="1.0">
+<dict>
+ <key>name</key>
+ <string>Comments</string>
+ <key>scope</key>
+ <string>source.cfscript</string>
+ <key>settings</key>
+ <dict>
+ <key>shellVariables</key>
+ <array>
+ <dict>
+ <key>name</key>
+ <string>TM_COMMENT_START</string>
+ <key>value</key>
+ <string>/* </string>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>TM_COMMENT_END</string>
+ <key>value</key>
+ <string> */</string>
+ </dict>
+ </array>
+ </dict>
+ <key>uuid</key>
+ <string>81BFADA4-ED09-30E3-33D3-17CBBEECD012</string>
+</dict>
+</plist>
30 Preferences/Comments.tmPreferences
@@ -0,0 +1,30 @@
+<?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">
+<plist version="1.0">
+<dict>
+ <key>name</key>
+ <string>Comments</string>
+ <key>scope</key>
+ <string>text.html.cfm</string>
+ <key>settings</key>
+ <dict>
+ <key>shellVariables</key>
+ <array>
+ <dict>
+ <key>name</key>
+ <string>TM_COMMENT_START</string>
+ <key>value</key>
+ <string>&lt;!--- </string>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>TM_COMMENT_END</string>
+ <key>value</key>
+ <string> ---&gt;</string>
+ </dict>
+ </array>
+ </dict>
+ <key>uuid</key>
+ <string>Z79BDBCF-D0C9-468E-BE62-744074D7825Z</string>
+</dict>
+</plist>
5 Snippets/cfdump.sublime-snippet
@@ -0,0 +1,5 @@
+<snippet>
+ <content><![CDATA[<cfdump var="#${1:$SELECTION}#" />]]></content>
+ <scope>text.html.cfm</scope>
+ <description>cfdump Tag</description>
+</snippet>
5 Snippets/cfoutput.sublime-snippet
@@ -0,0 +1,5 @@
+<snippet>
+ <content><![CDATA[<cfoutput>${0:$SELECTION}</cfoutput>]]></content>
+ <scope>text.html.cfm</scope>
+ <description>cfoutput Tag</description>
+</snippet>
6 Snippets/cfscript.sublime-snippet
@@ -0,0 +1,6 @@
+<snippet>
+ <content><![CDATA[<cfscript>${0:$SELECTION}</cfscript>]]></content>
+ <tabTrigger>&lt;</tabTrigger>
+ <scope>text.html.cfm</scope>
+ <description>cfscript Tag</description>
+</snippet>
189 Syntaxes/Cfscript.tmLanguage
@@ -0,0 +1,189 @@
+<?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>Coldfusion Cfscript Language</string>
+ <key>fileTypes</key>
+ <array>
+ <string>cfc</string>
+ </array>
+ <key>firstLineMatch</key>
+ <string>^#!/usr/bin/env node</string>
+ <key>foldingStartMarker</key>
+ <string>^.*\bfunction\s*(\w+\s*)?\([^\)]*\)(\s*\{[^\}]*)?\s*$</string>
+ <key>foldingStopMarker</key>
+ <string>^\s*\}</string>
+ <key>keyEquivalent</key>
+ <string>^~F</string>
+ <key>name</key>
+ <string>Cfscript</string>
+ <key>patterns</key>
+ <array>
+
+
+ <!-- IF I'M A TAG BASED COMPONENT -->
+ <dict>
+ <key>begin</key>
+ <string>(?:^\s+)?&lt;((?i:cfcomponent))\b(?![^&gt;]*/&gt;)</string>
+
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.cfml</string>
+ <!-- <string>entity.name.tag.cfquery.html</string> -->
+ </dict>
+ </dict>
+
+ <key>end</key>
+ <string>&lt;/((?i:cfcomponent))&gt;(?:\s*\n)?</string>
+
+ <key>name</key>
+ <string>source.cfc.embedded.cfml</string>
+
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#tag-stuff</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>&gt;</string>
+ <key>end</key>
+ <string>(?=&lt;/(?i:cfcomponent))</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>text.html.cfm</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ <!-- END IF I'M A TAG BASED COMPONENT -->
+
+
+
+
+ <dict>
+ <key>begin</key>
+ <string>/\*\*(?!/)</string>
+ <key>captures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.cfscript</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\*/</string>
+ <key>name</key>
+ <string>comment.block.documentation.cfscript</string>
+ </dict>
+
+ <!-- comment block /* */ -->
+ <dict>
+ <key>begin</key>
+ <string>/\*</string>
+ <key>captures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.cfscript</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\*/</string>
+ <key>name</key>
+ <string>comment.block.cfscript</string>
+ </dict>
+
+ <!-- double slash comment -->
+ <dict>
+ <key>match</key>
+ <string>(//).*$\n?</string>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.cfscript</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>comment.line.double-slash.cfscript</string>
+ </dict>
+
+
+ <!-- booleans true/false -->
+ <dict>
+ <key>match</key>
+ <string>\btrue\b</string>
+ <key>name</key>
+ <string>constant.language.boolean.true.cfscript</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>\bfalse\b</string>
+ <key>name</key>
+ <string>constant.language.boolean.false.cfscript</string>
+ </dict>
+
+ <!-- this isn't used just adding in case for later -->
+ <dict>
+ <key>match</key>
+ <string>\bnull\b</string>
+ <key>name</key>
+ <string>constant.language.null.cfscript</string>
+ </dict>
+
+ <!-- super/this -->
+ <dict>
+ <key>match</key>
+ <string>\b(super|this)\b</string>
+ <key>name</key>
+ <string>variable.language.cfscript</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(in|instanceof|new|delete|typeof|void)\b</string>
+ <key>name</key>
+ <string>keyword.operator.js</string>
+ </dict>
+
+
+ <!-- SUPPORT FUNCTIONS (ADD ALL CFSCRIPT FUNCTIONS HERE) -->
+ <dict>
+ <key>match</key>
+ <string>\b(s(h(ift|ow(Mod(elessDialog|alDialog)|Help))|croll(X|By(Pages|Lines)?|Y|To)?|t(op|rike)|i(n|zeToContent|debar|gnText)|ort|u(p|b(str(ing)?)?)|pli(ce|t)|e(nd|t(Re(sizable|questHeader)|M(i(nutes|lliseconds)|onth)|Seconds|Ho(tKeys|urs)|Year|Cursor|Time(out)?|Interval|ZOptions|Date|UTC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(ome|andleEvent)|navigate|c(har(CodeAt|At)|o(s|n(cat|textual|firm)|mpile)|eil|lear(Timeout|Interval)?|a(ptureEvents|ll)|reate(StyleSheet|Popup|EventObject))|t(o(GMTString|S(tring|ource)|U(TCString|pperCase)|Lo(caleString|werCase))|est|a(n|int(Enabled)?))|i(s(NaN|Finite)|ndexOf|talics)|d(isableExternalCapture|ump|etachEvent)|u(n(shift|taint|escape|watch)|pdateCommands)|j(oin|avaEnabled)|p(o(p|w)|ush|lugins.refresh|a(ddings|rse(Int|Float)?)|r(int|ompt|eference))|e(scape|nableExternalCapture|val|lementFromPoint|x(p|ec(Script|Command)?))|valueOf|UTC|queryCommand(State|Indeterm|Enabled|Value)|f(i(nd|le(ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(nt(size|color)|rward)|loor|romCharCode)|watch|l(ink|o(ad|g)|astIndexOf)|a(sin|nchor|cos|t(tachEvent|ob|an(2)?)|pply|lert|b(s|ort))|r(ou(nd|teEvents)|e(size(By|To)|calc|turnValue|place|verse|l(oad|ease(Capture|Events)))|andom)|g(o|et(ResponseHeader|M(i(nutes|lliseconds)|onth)|Se(conds|lection)|Hours|Year|Time(zoneOffset)?|Da(y|te)|UTC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Da(y|te)|FullYear)|FullYear|A(ttention|llResponseHeaders)))|m(in|ove(B(y|elow)|To(Absolute)?|Above)|ergeAttributes|a(tch|rgins|x))|b(toa|ig|o(ld|rderWidths)|link|ack))\b(?=\()</string>
+ <key>name</key>
+ <string>support.function.js</string>
+ </dict>
+
+
+
+
+
+
+
+ <!-- TODO: more cfscript shit here I guess -->
+
+
+
+
+ </array>
+
+ <key>scopeName</key>
+ <string>source.cfscript</string>
+ <key>uuid</key>
+ <string>93E017CC-6F27-11D9-90EB-000D93589AF6</string>
+</dict>
+</plist>
574 Syntaxes/Coldfusion.tmLanguage
@@ -0,0 +1,574 @@
+<?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>cfm</string>
+ <string>cfml</string>
+ </array>
+
+ <key>firstLineMatch</key>
+ <string>&lt;!DOCTYPE|doctype|&lt;(?i:html)</string>
+
+ <key>foldingStartMarker</key>
+ <string>(?x)
+ (&lt;(?i:a|article|aside|audio|blockquote|body|canvas|datalist|details|div|dl|fieldset|figcaption|figure|footer|form|head|header|hgroup|li|mark|meter|nav|ol|output|p|progress|rp|rt|ruby|script|section|select|small|style|summary|table|tbody|tfoot|thead|time|tr|ul|video|cfloop|cfif|cfswitch|cfcomponent|cffunction|cfcase|cfdefaultcase|cfsavecontent|cfscript)\b.*?&gt;
+ |&lt;!--(?!.*--\s*&gt;)
+ |&lt;!---(?!.*---\s*&gt;)|function\s*|if
+ )</string>
+
+ <key>foldingStopMarker</key>
+ <string>(?x)
+ (&lt;/(?i:a|article|aside|audio|blockquote|body|canvas|datalist|details|div|dl|fieldset|figcaption|figure|footer|form|head|header|hgroup|li|mark|meter|nav|ol|output|p|progress|rp|rt|ruby|script|section|select|small|style|summary|table|tbody|tfoot|thead|time|tr|ul|video|cfloop|cfif|cfswitch|cfcomponent|cffunction|cfcase|cfdefaultcase|cfsavecontent|cfscript)&gt;
+ |^(?!.*?&lt;!--).*?--\s*&gt;
+ |^(?!.*?&lt;!---).*?---\s*&gt;|\}
+ |^[^{]*\}
+ )</string>
+
+ <key>keyEquivalent</key>
+ <string>^~@c</string>
+
+ <key>name</key>
+ <string>Coldfusion</string>
+
+ <key>patterns</key>
+
+ <array>
+
+
+
+
+
+
+
+
+ <!-- STARTED CFSCRIPT -->
+ <dict>
+ <key>begin</key>
+ <!-- <string>(?:^\s+)?(&lt;)((?i:cfscript))\b(?![^&gt;]*/&gt;)</string> -->
+ <string>(?:^\s+)?(&lt;)((?i:cfscript))\b(?![^&gt;]*/&gt;)</string>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.begin.cfml</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.cfml</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.end.cfml</string>
+ </dict>
+ </dict>
+
+ <key>end</key>
+ <!-- <string>(?&lt;=&lt;/(cfscript|CFSCRIPT))(&gt;)(?:\s*\n)?</string> -->
+ <string>(&lt;/)(cfscript|CFSCRIPT)(&gt;)</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.end.cfml</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.cfml</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.tag.end.cfml</string>
+ </dict>
+ </dict>
+
+ <key>name</key>
+ <string>source.cfscript.embedded.html</string>
+
+ <key>patterns</key>
+
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.cfscript</string>
+ </dict>
+ </array>
+ </dict>
+ <!-- /end STARTED CFSCRIPT -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <!-- CFQUERY SHIT -->
+ <dict>
+ <key>begin</key>
+ <string>(?:^\s+)?&lt;((?i:cfquery))\b(?![^&gt;]*/&gt;)</string>
+
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.cfml</string>
+ <!-- <string>entity.name.tag.cfquery.html</string> -->
+ </dict>
+ </dict>
+
+ <key>end</key>
+ <string>&lt;/((?i:cfquery))&gt;(?:\s*\n)?</string>
+
+ <key>name</key>
+ <string>source.sql.embedded.cfml</string>
+
+ <key>patterns</key>
+ <array>
+ <!-- this is here to colour the cfquery tag's attributes -->
+ <dict>
+ <key>include</key>
+ <string>#tag-stuff</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>&gt;</string>
+ <key>end</key>
+ <string>(?=&lt;/(?i:cfquery))</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.sql</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+ <!-- END CFQUERY SHIT -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <dict>
+ <key>include</key>
+ <string>#cfcomment</string>
+ </dict>
+
+ <dict>
+ <key>include</key>
+ <string>text.html.basic</string>
+ </dict>
+ </array>
+
+
+<!-- *****************************
+ REPOSITORY
+ -->
+
+ <key>repository</key>
+ <dict>
+
+ <key>embedded-code</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+<!-- <dict>
+ <key>include</key>
+ <string>#ruby</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#php</string>
+ </dict> -->
+ <!--
+ <dict>
+ <key>include</key>
+ <string>#smarty</string>
+ </dict>
+ -->
+<!-- <dict>
+ <key>include</key>
+ <string>#python</string>
+ </dict> -->
+ </array>
+ </dict>
+
+
+ <key>entities</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.entity.html</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.entity.html</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(&amp;)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)</string>
+ <key>name</key>
+ <string>constant.character.entity.html</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>&amp;</string>
+ <key>name</key>
+ <string>invalid.illegal.bad-ampersand.html</string>
+ </dict>
+ </array>
+ </dict>
+
+
+ <key>string-double-quoted</key>
+ <dict>
+ <key>begin</key>
+ <string>"</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.begin.html</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>"</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.end.html</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>string.quoted.double.html</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#embedded-code</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#entities</string>
+ </dict>
+ </array>
+ </dict>
+ <key>string-single-quoted</key>
+ <dict>
+ <key>begin</key>
+ <string>'</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.begin.html</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>'</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.end.html</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>string.quoted.single.html</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#embedded-code</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#entities</string>
+ </dict>
+ </array>
+ </dict>
+ <key>tag-generic-attribute</key>
+ <dict>
+ <key>match</key>
+ <string>\b([a-zA-Z\-:]+)</string>
+ <key>name</key>
+ <string>entity.other.attribute-name.html</string>
+ </dict>
+ <key>tag-id-attribute</key>
+ <dict>
+ <key>begin</key>
+ <string>\b(id)\b\s*(=)</string>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>entity.other.attribute-name.id.html</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.separator.key-value.html</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>(?&lt;='|")</string>
+ <key>name</key>
+ <string>meta.attribute-with-value.id.html</string>
+ <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.html</string>
+ </dict>
+ </dict>
+ <key>contentName</key>
+ <string>meta.toc-list.id.html</string>
+ <key>end</key>
+ <string>"</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.end.html</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>string.quoted.double.html</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#embedded-code</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#entities</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>'</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.begin.html</string>
+ </dict>
+ </dict>
+ <key>contentName</key>
+ <string>meta.toc-list.id.html</string>
+ <key>end</key>
+ <string>'</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.string.end.html</string>
+ </dict>
+ </dict>
+ <key>name</key>
+ <string>string.quoted.single.html</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#embedded-code</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#entities</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ </dict>
+
+
+
+
+ <key>tag-stuff</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#tag-id-attribute</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#tag-generic-attribute</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#string-double-quoted</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#string-single-quoted</string>
+ </dict>
+ <dict>
+ <key>include</key>
+ <string>#embedded-code</string>
+ </dict>
+ </array>
+ </dict>
+
+
+
+
+
+
+ <key>cfcomment</key>
+ <dict>
+ <key>begin</key>
+ <string>&lt;!---</string>
+ <key>end</key>
+ <string>---\s*&gt;</string>
+ <key>name</key>
+ <!-- <string>comment.block.html</string> -->
+ <!-- this is set to line to differentiate htmlcomment/cfcomment -->
+ <string>comment.line.cfml</string>
+ </dict>
+ </dict>
+
+
+
+
+ <key>scopeName</key>
+ <string>text.html.cfm</string>
+
+
+ <key>uuid</key>
+ <string>ZD34E6DA-6B1C-11D9-8CC2-000D93589EDF</string>
+</dict>
+</plist>
20 cfml_completions.py
@@ -0,0 +1,20 @@
+import sublime, sublime_plugin
+
+# Provide completions that match just after typing an opening angle bracket
+class TagCompletions(sublime_plugin.EventListener):
+ def on_query_completions(self, view, prefix, locations):
+ # Only trigger within HTML
+ if not view.match_selector(locations[0],
+ "text.html.cfm - source"):
+ return []
+
+ pt = locations[0] - len(prefix) - 1
+ ch = view.substr(sublime.Region(pt, pt + 1))
+ if ch != '<':
+ return []
+
+ return ([
+ ("cfset\tCfml", "cfset $1 />"),
+ ("cfdump\tCfml", "cfdump var=\"#${1:selection}#\" >"),
+
+ ], sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS)
30 readme.md
@@ -0,0 +1,30 @@
+# Coldfusion package for Sublime Text 2
+
+* Coldfusion syntax highlight.
+* Auto Inserts closing hash #
+* Less than (<) triggers cfml auto complete
+* Keyboard Shortcuts
+
+### Keyboard Shortcuts
+
+* ctrl+shift+o <cfoutput></cfoutput>
+* ctrl+alt+r <cfscript></cfscript>
+* ctrl+alt+d <cfdump var="##">
+* ctrl+shift+m <!--- --->
+
+## Installation
+
+If you are a git user, the best way to install this bundle and keep up to date is to clone the repo directly into your `Packages` directory in the Sublime Text 2 application settings area.
+
+### Using Git
+
+Go to your Sublime Text 2 `Packages` directory and clone the repository using the command below:
+
+ git clone https://github.com/SublimeText/Coldfusion "Coldfusion"
+
+### Download Manually
+
+* Download the files using the GitHub .zip download option
+* Unzip the files and rename the folder to `Coldfusion`
+* Copy the folder to your Sublime Text 2 `Packages` directory
+

0 comments on commit 0ca5f06

Please sign in to comment.