Permalink
Browse files

Massive reorganization of the whole bundle. Removed some old carp. Ad…

…ded some new handy stuff:

Convert Javascript to HTML Script tag
Show TM_* Variables as HTML
Sort Lines from Right
  • Loading branch information...
1 parent 27d08b4 commit cf6e212440c65a382f9927fae06a474e205fd27a @subtleGradient committed Jul 19, 2008
@@ -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">
<dict>
<key>beforeRunningCommand</key>
@@ -23,7 +23,7 @@ end tell" &amp;&gt;/dev/null &amp;
<key>keyEquivalent</key>
<string>@r</string>
<key>name</key>
- <string>Aqua Data Studio the clipboard</string>
+ <string>Send the clipboard to Aqua Data Studio</string>
<key>output</key>
<string>discard</string>
<key>scope</key>
@@ -1,19 +0,0 @@
-<?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>echo "&lt;pre&gt;"
-set</string>
- <key>input</key>
- <string>none</string>
- <key>name</key>
- <string>Check Variables</string>
- <key>output</key>
- <string>showAsHTML</string>
- <key>uuid</key>
- <string>109A97B0-F057-4954-A99F-DB88D6A81242</string>
-</dict>
-</plist>
@@ -0,0 +1,50 @@
+<?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>#!/usr/bin/env ruby
+require ENV['TM_SUPPORT_PATH'] + '/lib/escape'
+
+puts &lt;&lt;-HTML
+&lt;!-- -*- Mode: HTML; -*- --&gt;
+&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
+&lt;html&gt;
+&lt;head&gt;
+ &lt;meta http-equiv="Content-type" content="text/html; charset=utf-8" /&gt;
+ &lt;title&gt;${1:#{e_snp ENV['TM_FILENAME']}}&lt;/title&gt;
+${2: &lt;link rel="stylesheet" href="${10:http://tripledoubleyou.subtlegradient.com/c/blueprint/}screen.css" type="text/css" media="screen" charset="utf-8" /&gt;
+ &lt;link rel="stylesheet" href="${10:http://tripledoubleyou.subtlegradient.com/c/blueprint/}print.css" type="text/css" media="print" charset="utf-8" /&gt;
+ &lt;!--[if IE]&gt;&lt;link rel="stylesheet" href="${10:http://tripledoubleyou.subtlegradient.com/c/blueprint/}ie.css" type="text/css" media="screen" charset="utf-8" /&gt;&lt;![endif]--&gt;
+}&lt;/head&gt;
+&lt;body&gt;
+$0
+&lt;script type="text/javascript" charset="utf-8"&gt;
+
+#{e_sn STDIN.read.sub(/\A\s+/m,'').sub(/\s+\Z/m,'')}
+
+&lt;/script&gt;
+${3:&lt;!--[if gte IE 6]&gt;&lt;!--&gt;&lt;script src="${20:http://tripledoubleyou.subtlegradient.com/j/}mootools-trunk.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;&lt;!-- &lt;![endif]--&gt;
+}&lt;/body&gt;
+&lt;/html&gt;
+HTML
+</string>
+ <key>fallbackInput</key>
+ <string>scope</string>
+ <key>input</key>
+ <string>selection</string>
+ <key>keyEquivalent</key>
+ <string>^H</string>
+ <key>name</key>
+ <string>Convert to HTML Script tag</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>source.js - text.html</string>
+ <key>uuid</key>
+ <string>BFA10BBE-6043-41CE-9629-B3A3B59C3A2C</string>
+</dict>
+</plist>
@@ -1,86 +0,0 @@
-<?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>cat &lt;&lt;EOF
-&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;&lt;html&gt;&lt;head&gt;
-&lt;style type="text/css" media="screen"&gt;
-/* &lt;![CDATA[ */
-
-* {
- margin: 0;
- padding: 0;
-}
-body {
- background: white;
- color: black;
- font: 11px "Consolas", monospace;
- padding: 10px;
-}
-result { width: 100%; overflow: auto; }
-
-/* ]]&gt; */
-&lt;/style&gt;
-&lt;script type="text/javascript"&gt;
-
-Element = {};
-Element.scrollTo = function(element) {
- element = document.getElementById(element);
- var x = element.x ? element.x : element.offsetLeft,
- y = element.y ? element.y : element.offsetTop;
- window.scrollTo(x, y);
-};
-
-function init()
-{
- TextMate.isBusy = true;
- TextMate.system('echo -n '' &gt; /tmp/autotest.log', start);
-}
-
-function start()
-{
- var myCommand = TextMate.system('tail -f /tmp/autotest.log', done);
- myCommand.onreadoutput = outputHandler;
- myCommand.onreaderror = outputHandler;
-}
-
-function outputHandler(currentStringOnStdout)
-{
- document.getElementById("result").innerHTML += currentStringOnStdout;
- Element.scrollTo('end');
-}
-
-function done()
-{
- document.getElementById("result").innerHTML += '\n.\n'
- TextMate.isBusy = false;
-};
-
-
-TextMate.isBusy = true;
-//init();
-
-&lt;/script&gt;
- &lt;title&gt;&lt;/title&gt;
-
-&lt;/head&gt;&lt;body&gt;
- &lt;pre id="result"&gt;&lt;/pre&gt;
- &lt;p id="end"&gt;&lt;input type="button" onclick="myCommand.cancel();" value="STOP" /&gt;&lt;/p&gt;
-&lt;/body&gt;&lt;/html&gt;
-EOF
-</string>
- <key>fallbackInput</key>
- <string>document</string>
- <key>input</key>
- <string>none</string>
- <key>name</key>
- <string>CrazyEgg AutoTest</string>
- <key>output</key>
- <string>showAsHTML</string>
- <key>uuid</key>
- <string>48FCD645-EB89-4333-9E5B-FAD1B277CB12</string>
-</dict>
-</plist>
@@ -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">
<dict>
<key>beforeRunningCommand</key>
@@ -59,7 +59,7 @@ EOF
<key>input</key>
<string>none</string>
<key>name</key>
- <string>Insert Text From HTML Output window</string>
+ <string>GUI to Insert Text From HTML Output window</string>
<key>output</key>
<string>showAsHTML</string>
<key>uuid</key>
@@ -1,20 +0,0 @@
-<?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>echo "&lt;meta http-equiv='Refresh'
- content='0;URL= http://www.pandora.com?cmd=mini'&gt;"
-</string>
- <key>input</key>
- <string>none</string>
- <key>name</key>
- <string>Pandora Mini</string>
- <key>output</key>
- <string>showAsHTML</string>
- <key>uuid</key>
- <string>B02AFB5F-0D9F-424A-8306-2756320EBC5D</string>
-</dict>
-</plist>
@@ -0,0 +1,53 @@
+<?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>beforeRunningScript</key>
+ <string>nop</string>
+ <key>captureFormatString</key>
+ <string>(1?$2:&lt;nop&gt;)</string>
+ <key>capturePattern</key>
+ <string>(^TM_(.*)$)?</string>
+ <key>command</key>
+ <string>#!/usr/bin/env ruby
+print `. "$TM_SUPPORT_PATH/lib/webpreview.sh";html_header "TextMate Environment Variables"`
+
+require "cgi"
+
+print '&lt;style&gt;table{width:100%}tr&gt;*{border-bottom:1px solid white;}&lt;/style&gt;&lt;pre&gt;&lt;table&gt;'
+ENV.sort.each do |k,v|
+ next unless k =~ /^TM_/
+
+ print '&lt;tr&gt;'
+
+ print '&lt;th style="text-align:left; vertical-align:top"&gt;'
+ print k
+ print '&lt;/th&gt;'
+
+ print %{&lt;td&gt;&lt;b&gt;&lt;/b&gt;&lt;code&gt;}
+ print CGI::escapeHTML(v).gsub(/\n/,"&lt;b style='color:#0AA'&gt;\\n&lt;/b&gt;\n")
+ print '&lt;/code&gt;&lt;b&gt;&lt;/b&gt;&lt;/td&gt;'
+
+ print "&lt;/tr&gt;\n"
+
+end
+print '&lt;/table&gt;&lt;/pre&gt;'
+
+print `. "$TM_SUPPORT_PATH/lib/webpreview.sh";html_footer`
+</string>
+ <key>input</key>
+ <string>none</string>
+ <key>name</key>
+ <string>Show TM_* Variables as HTML</string>
+ <key>output</key>
+ <string>showAsHTML</string>
+ <key>standardInput</key>
+ <string>selectedText</string>
+ <key>standardOutput</key>
+ <string>separateWindow</string>
+ <key>uuid</key>
+ <string>1FF09E1A-CE96-4B55-9D02-6B3EA750C903</string>
+</dict>
+</plist>
@@ -18,7 +18,7 @@ end tell
<key>keyEquivalent</key>
<string>^~@p</string>
<key>name</key>
- <string>Show Web Preview</string>
+ <string>Show Web Preview Window</string>
<key>output</key>
<string>discard</string>
<key>scope</key>
@@ -0,0 +1,31 @@
+<?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>#!/usr/bin/env ruby
+class String
+ def reverse_sort
+ # return self.split("\n").map{|row| row.ljust(5000) }.join("\n").reverse.sort().join("").gsub(/^[\ \t]+/,'').reverse#.sub(/\A\n/,'')
+ return self.sort do|a,b|
+ a.rstrip.reverse &lt;=&gt; b.rstrip.reverse
+ end.join
+ end
+end
+
+print STDIN.read.reverse_sort
+</string>
+ <key>input</key>
+ <string>selection</string>
+ <key>keyEquivalent</key>
+ <string></string>
+ <key>name</key>
+ <string>Sort Lines from the Right</string>
+ <key>output</key>
+ <string>replaceSelectedText</string>
+ <key>uuid</key>
+ <string>261B3EF9-5E75-41F8-A733-48C2A1C53D5B</string>
+</dict>
+</plist>
@@ -1,25 +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>alignLeft:</string>
- </dict>
- <dict>
- <key>command</key>
- <string>indent:</string>
- </dict>
- </array>
- <key>keyEquivalent</key>
- <string>^~l</string>
- <key>name</key>
- <string>Align Left &amp; Indent</string>
- <key>scopeType</key>
- <string>local</string>
- <key>uuid</key>
- <string>0CEFF949-3AFD-413B-9092-9D263B3081CE</string>
-</dict>
-</plist>
@@ -60,7 +60,7 @@
<key>keyEquivalent</key>
<string></string>
<key>name</key>
- <string>Balance Jr Back copy</string>
+ <string>Balance Jr Back</string>
<key>scopeType</key>
<string>local</string>
<key>useGlobalClipboard</key>
@@ -60,7 +60,7 @@
<key>keyEquivalent</key>
<string></string>
<key>name</key>
- <string>Balance Jr Foreward copy</string>
+ <string>Balance Jr Foreward</string>
<key>scopeType</key>
<string>local</string>
<key>useGlobalClipboard</key>
@@ -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">
<dict>
<key>commands</key>
@@ -57,7 +57,7 @@
</dict>
</array>
<key>name</key>
- <string>TM Tab Stop</string>
+ <string>Wrap as Snippet Tab Stop</string>
<key>scopeType</key>
<string>local</string>
<key>uuid</key>
Oops, something went wrong.

0 comments on commit cf6e212

Please sign in to comment.