Permalink
Browse files

First commit of this bundle, borrows some from Markdown. Enough new s…

…tuff to really get me in trouble though so tell me whats bout to explode in my face. ;)

git-svn-id: http://svn.textmate.org/trunk/Bundles/Setext.tmbundle@1134 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
0 parents commit db4f9343fa02fe048b430ace4239308327ccfb94 @infininight infininight committed Jun 1, 2005
@@ -0,0 +1,22 @@
+<?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>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>head -n $(($TM_LINE_NUMBER -1))|tail -n 1|sed 's/./-/g'|tail -c +"$TM_COLUMN_NUMBER"</string>
+ <key>input</key>
+ <string>document</string>
+ <key>name</key>
+ <string>Subheading (-)</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>text.setext</string>
+ <key>tabTrigger</key>
+ <string>-</string>
+ <key>uuid</key>
+ <string>95C6ECD1-69B9-4EB9-840B-C7753C226306</string>
+</dict>
+</plist>
@@ -0,0 +1,22 @@
+<?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>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>head -n $(($TM_LINE_NUMBER -1))|tail -n 1|sed 's/./=/g'|tail -c +"$TM_COLUMN_NUMBER"</string>
+ <key>input</key>
+ <string>document</string>
+ <key>name</key>
+ <string>Title (=)</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>text.setext</string>
+ <key>tabTrigger</key>
+ <string>=</string>
+ <key>uuid</key>
+ <string>8E5BEE2D-01D5-455A-A576-044DCC1243AA</string>
+</dict>
+</plist>
@@ -0,0 +1,17 @@
+<?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>content</key>
+ <string>.. _${1:hot_word} ${2:http://macromates.com/}
+$0</string>
+ <key>name</key>
+ <string>Hypertext Link Def (link)</string>
+ <key>scope</key>
+ <string>text.setext</string>
+ <key>tabTrigger</key>
+ <string>link</string>
+ <key>uuid</key>
+ <string>D983EE17-2AD0-4638-BCC0-5622DE545093</string>
+</dict>
+</plist>
@@ -0,0 +1,17 @@
+<?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>content</key>
+ <string>.. _${1:hot_word} (${2:note text})
+$0</string>
+ <key>name</key>
+ <string>Hypertext Note Def (note)</string>
+ <key>scope</key>
+ <string>text.setext</string>
+ <key>tabTrigger</key>
+ <string>note</string>
+ <key>uuid</key>
+ <string>FD9B5384-BAB6-48CC-B8BE-B4BD44AD65D7</string>
+</dict>
+</plist>
@@ -0,0 +1,65 @@
+{
+ name = "Setext";
+ fileTypes = ( etx, etx.txt );
+ firstLineMatch = "setext";
+ scopeName = "text.setext";
+ patterns = (
+ // Inline formatting
+ { include = "text.setext.inline"; },
+
+ // Block formatting
+ { name = "markup.other.mail_header.setext";
+ match = "^((Subject|Date|From):) (.+)";
+ captures = {
+ 1 = { name = "markup.other.mail_header.name.setext"; };
+ 3 = { name = "markup.other.mail_header.value.setext"; };
+ };
+ },
+ { name = "markup.other.heading.1.setext";
+ match = "^={3,}$";
+ },
+ { name = "markup.other.heading.2.setext";
+ match = "^-{3,}$";
+ },
+ { name = "markup.other.include.setext";
+ begin = "^>\\s";
+ end = "$";
+ patterns = (
+ { include = "text.setext.inline"; }
+ );
+ },
+ { name = "markup.other.bullet.setext";
+ begin = "^[*]\\s";
+ end = "$";
+ patterns = (
+ { include = "text.setext.inline"; }
+ );
+ },
+ { name = "markup.other.raw.setext";
+ begin = "`";
+ end = "`";
+ },
+ { name = "markup.other.note_def.setext";
+ match = "^\\.{2} (_[\\w.]+) +(\\(.+)$";
+ captures = {
+ 1 = { name = "markup.other.hotword.setext"; };
+ 2 = { name = "markup.other.note.setext"; };
+ };
+ },
+ { name = "markup.other.href_def.setext";
+ match = "^\\.{2} (_[\\w.]+) +(.{2,})$";
+ captures = {
+ 1 = { name = "markup.other.hotword.setext"; };
+ 2 = { name = "markup.underline.link.setext"; };
+ };
+ },
+ { name = "comment.line.double-dot.setext";
+ match = "^\\.{2} (?![.]).+";
+ },
+ { name = "comment.block.logical_end_of_text.setext";
+ begin = "^\\.{2}$";
+ end = "dummy text you should never find";
+ },
+ );
+ uuid = "FB227CE6-DC4C-4632-BCA3-965AE0D8E419";
+}
@@ -0,0 +1,29 @@
+{
+ name = "Inline Setext";
+ scopeName = "text.setext.inline";
+ patterns = (
+ { name = "markup.italic.setext";
+ match = "~\\w+~";
+ },
+ { name = "markup.bold.setext";
+ match = "[*]{2}.+?[*]{2}";
+ },
+ { name = "markup.underline.setext";
+ match = "\\b_\\w+(?<!_)_\\b|\\b_.+(?<!_)_\\b";
+ },
+ { name = "markup.underline.link.hotword.setext";
+ match = "\\b[\\w.]*\\w(?<!_)_\\b";
+ },
+ // This isn't actually part of setext, added because Tidbits uses it.
+ { name = "markup.underline.link.setext";
+ match = "<(?i:mailto|https?|ftp|news)://.*?>";
+ },
+ { name = "markup.other.raw";
+ match = "`.*`";
+ },
+ { name = "markup.other.document_divider";
+ match = "\\s*\\$\\$($|\\n)";
+ },
+ );
+ uuid = "40A9752F-18D9-4466-8C11-CF369152BA59";
+}
@@ -0,0 +1,19 @@
+<?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>Setext</string>
+ <key>ordering</key>
+ <array>
+ <string>8E5BEE2D-01D5-455A-A576-044DCC1243AA</string>
+ <string>95C6ECD1-69B9-4EB9-840B-C7753C226306</string>
+ <string>D983EE17-2AD0-4638-BCC0-5622DE545093</string>
+ <string>FD9B5384-BAB6-48CC-B8BE-B4BD44AD65D7</string>
+ <string>40A9752F-18D9-4466-8C11-CF369152BA59</string>
+ <string>FB227CE6-DC4C-4632-BCA3-965AE0D8E419</string>
+ </array>
+ <key>uuid</key>
+ <string>808F13D3-8536-47DC-8AB5-BDA131F0F91B</string>
+</dict>
+</plist>

0 comments on commit db4f934

Please sign in to comment.