Permalink
Browse files

Added a grammar for Codex, which allows other inline grammars (for in…

…stance Ruby).

+ a few snippets
  • Loading branch information...
1 parent 32c80ce commit bbcdbfe77afc21855f500b35ca89ca3a515f01ef @cth cth committed Jun 7, 2008
View
4 Commands/Generate all.tmCommand
@@ -10,13 +10,13 @@ cd "$TM_DIRECTORY/.."
rake all
echo "&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;"</string>
<key>input</key>
- <string>selection</string>
+ <string>none</string>
<key>keyEquivalent</key>
<string>@b</string>
<key>name</key>
<string>Generate all</string>
<key>output</key>
- <string>replaceSelectedText</string>
+ <string>showAsHTML</string>
<key>scope</key>
<string>text.html.textile.codex.slides</string>
<key>uuid</key>
View
16 Snippets/code.tmSnippet
@@ -0,0 +1,16 @@
+<?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>:code ${1:filename} [class=${2:code-small|code-large}]</string>
+ <key>name</key>
+ <string>code</string>
+ <key>scope</key>
+ <string>text.html.textile.codex.slides</string>
+ <key>tabTrigger</key>
+ <string>:code</string>
+ <key>uuid</key>
+ <string>34634BFD-E1FF-4797-896E-DE82D110A195</string>
+</dict>
+</plist>
View
16 Snippets/graphviz.tmSnippet
@@ -0,0 +1,16 @@
+<?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>:graphviz ${1:filename} [engine=${2:dot|neato}]</string>
+ <key>name</key>
+ <string>graphviz</string>
+ <key>scope</key>
+ <string>text.html.textile.codex.slides</string>
+ <key>tabTrigger</key>
+ <string>:gv</string>
+ <key>uuid</key>
+ <string>357F0CBA-A61E-43C0-A932-E41C92B81F3B</string>
+</dict>
+</plist>
View
18 Snippets/inline code.tmSnippet
@@ -0,0 +1,18 @@
+<?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>:inlinecode [class=${2:code-small|code-large}]
+ ${3:your code here..}
+:endinlinecode</string>
+ <key>name</key>
+ <string>inline code</string>
+ <key>scope</key>
+ <string>text.html.textile.codex.slides</string>
+ <key>tabTrigger</key>
+ <string>:icode</string>
+ <key>uuid</key>
+ <string>A4A51D04-F329-4F07-9BBC-20B062F19433</string>
+</dict>
+</plist>
View
18 Snippets/inline graphviz.tmSnippet
@@ -0,0 +1,18 @@
+<?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>:inlinegraphviz [engine=${2:dot|neato}]
+ ${3:your code here..}
+:endinlinecode</string>
+ <key>name</key>
+ <string>inline graphviz</string>
+ <key>scope</key>
+ <string>text.html.textile.codex.slides</string>
+ <key>tabTrigger</key>
+ <string>:igv</string>
+ <key>uuid</key>
+ <string>4C88434B-8F18-4897-9328-7DC0F9CF627C</string>
+</dict>
+</plist>
View
105 Syntaxes/Codex.tmLanguage
@@ -8,13 +8,118 @@
</array>
<key>firstLineMatch</key>
<string>textile</string>
+ <key>foldingStartMarker</key>
+ <string>^:inline.*</string>
+ <key>foldingStopMarker</key>
+ <string>^:end(.*)?$</string>
<key>keyEquivalent</key>
<string>^~C</string>
<key>name</key>
<string>Codex</string>
<key>patterns</key>
<array>
<dict>
+ <key>begin</key>
+ <string>^(:inlinecode)(\s?[\s?lang=ruby\s?])</string>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.inlinestart.codex.slides</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>variable.inlineparam.codex.slides</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.inlinestop.codex.slides</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>^(:endcode|endinlinecode|end)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.ruby</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>^(:inlinegraphviz)(.*)?</string>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.inlinestart.codex.slides</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>variable.inlineparam.codex.slides</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.inlinestop.codex.slides</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>^(:end|:endgraphviz|:endinlinegraphviz)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.dot</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>^(:inline.*)\s.*</string>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.inlinestart.codex.slides</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.inlinestop.codex.slides</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>^(:end|:end.*)</string>
+ <key>name</key>
+ <string>markup.raw.codex.slides</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>^:code</string>
+ <key>name</key>
+ <string>keyword.code.codex.slides</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>^:graphviz</string>
+ <key>name</key>
+ <string>keyword.graphviz.codex.slides</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>^:webtex</string>
+ <key>name</key>
+ <string>keyword.webtex.codex.slides</string>
+ </dict>
+ <dict>
<key>include</key>
<string>text.html.textile</string>
</dict>
View
4 info.plist
@@ -7,6 +7,10 @@
<key>ordering</key>
<array>
<string>9AFDCAC5-EF44-4839-93F2-51BD7305A772</string>
+ <string>34634BFD-E1FF-4797-896E-DE82D110A195</string>
+ <string>357F0CBA-A61E-43C0-A932-E41C92B81F3B</string>
+ <string>A4A51D04-F329-4F07-9BBC-20B062F19433</string>
+ <string>4C88434B-8F18-4897-9328-7DC0F9CF627C</string>
<string>7C434B0D-364F-451C-B952-59D3EBE23A95</string>
<string>655CEFA5-B096-4D17-AE63-0D75D305D7AA</string>
<string>F24E1D00-8974-4B15-BBB2-86BA9F3FD2FA</string>

0 comments on commit bbcdbfe

Please sign in to comment.