<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>subtleGradient comments on Select Balanced HTML Tag</title>
    <link>http://subtlegradient.com/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>subtleGradient comments</description>
    <item>
      <title>"Select Balanced HTML Tag": comment by Thomas Aylott</title>
      <description>&lt;p&gt; UPDATE :&lt;/p&gt;


	&lt;p&gt;New version by Hans-Jörg Bibiko (same link)&lt;/p&gt;</description>
      <pubDate>Sun, 25 Nov 2007 19:35:27 PST</pubDate>
      <guid>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-465</guid>
      <link>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-465</link>
    </item>
    <item>
      <title>"Select Balanced HTML Tag": comment by Thomas Aylott</title>
      <description>&lt;p&gt;Yeah. I started working on a version that selected only the insides but it was ending up being  MUCH  more complex and slower. So I went with this version for now.&lt;/p&gt;


	&lt;p&gt;For general selection stuff I use Balance Jr. Also available from http://Bundleforge.com&lt;/p&gt;


	&lt;p&gt;Balance Jr selects things very well, but not so great for nested brackets or tags. I have Balance Jr Forward and Back bound to the &lt;code&gt;home&lt;/code&gt; and &lt;code&gt;end&lt;/code&gt; keys.&lt;/p&gt;</description>
      <pubDate>Fri, 16 Nov 2007 02:06:48 PST</pubDate>
      <guid>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-464</guid>
      <link>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-464</link>
    </item>
    <item>
      <title>"Select Balanced HTML Tag": comment by Nicholas Schlueter</title>
      <description>&lt;p&gt;sounds good, I totally understand!  I looked at the macro a little bit but my face started to melt, so I gave up.  I look forward to the next revision.&lt;/p&gt;</description>
      <pubDate>Thu, 15 Nov 2007 19:13:40 PST</pubDate>
      <guid>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-463</guid>
      <link>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-463</link>
    </item>
    <item>
      <title>"Select Balanced HTML Tag": comment by Dean Strelau</title>
      <description>&lt;p&gt;From what I see in the video, there&amp;#8217;s a crucial difference in the BBEdit version of this command though: it selects the text inside the tags without selecting the tags themselves. The TM and DW versions also select the tags.&lt;/p&gt;</description>
      <pubDate>Thu, 15 Nov 2007 15:31:54 PST</pubDate>
      <guid>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-462</guid>
      <link>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-462</link>
    </item>
    <item>
      <title>"Select Balanced HTML Tag": comment by Thomas aylott</title>
      <description>&lt;p&gt;yeah, the first version is only really useful in boring vanilla  HTML . I plan to upgrade it once I can pry another few precious minutes of &amp;#8220;free time&amp;#8221; out of my schedule.&lt;/p&gt;


	&lt;p&gt;I will of course let you all know when that happens.&lt;/p&gt;


	&lt;p&gt;I just knew that there would be some people out there like myself that have been pining for this forever and wouldnt&amp;#8217; want to have to wait for the full fancy and actually bugfree version ;)&lt;/p&gt;</description>
      <pubDate>Thu, 15 Nov 2007 11:01:05 PST</pubDate>
      <guid>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-461</guid>
      <link>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-461</link>
    </item>
    <item>
      <title>"Select Balanced HTML Tag": comment by Nicholas Schlueter</title>
      <description>&lt;p&gt;This is awesome!  I wish it worked with my rhtml files in rails though (hint, hint).&lt;/p&gt;</description>
      <pubDate>Thu, 15 Nov 2007 10:18:11 PST</pubDate>
      <guid>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-460</guid>
      <link>http://subtlegradient.com/articles/2007/11/15/select-balanced-html-tag#comment-460</link>
    </item>
    <item>
      <title>"Select Balanced HTML Tag" by admin</title>
      <description>&lt;p&gt;hey kids&lt;br&gt;
just wanted to share with you my latest textmate innovation.&lt;/p&gt;


	&lt;p&gt;There is a bit of standard functionality that major html editors have been capable of forever&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;In BBEdit it&amp;#8217;s called &lt;code&gt;View &amp;gt; Balance&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;In Dreamweaver it&amp;#8217;s called &lt;code&gt;Edit &amp;gt; Select Parent Tag&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;What this does is select the current html tag, no matter where your caret is in between the opening and closing tags.&lt;/p&gt;


	&lt;p&gt;Ok, that&amp;#8217;s all fine and lovely, but I use TextMate. And while TextMate has an &lt;code&gt;Edit &amp;gt; Select &amp;gt; Enclosing Brackets&lt;/code&gt; function. That doesn&amp;#8217;t actually DO anything in &lt;span class="caps"&gt;HTML&lt;/span&gt;. Nothing useful anyway.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://tripledoubleyou.subtlegradient.com/stuff/BundleForge%20-%20TextMate%20Select%20Balanced%20HTML%20Tag.m4v"&gt;&lt;img src="http://tripledoubleyou.subtlegradient.com/stuff/BundleForge%20-%20TextMate%20Select%20Balanced%20HTML%20Tag.jpg" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;So, what is the solution? How do we actually make this work in TextMate?&lt;/p&gt;


	&lt;p&gt;Well, that&amp;#8217;s where I come in. TextMate is built on a community of developers who spend time extending and expanding on what TextMate is capable of.&lt;/p&gt;


	&lt;p&gt;So, I have been goofing around with ruby scripts and insanely complex regular expressions since 2005 trying to make this work.&lt;/p&gt;


	&lt;p&gt;And I have &lt;em&gt;finally&lt;/em&gt; managed to come up with something that is simple and uses the normal standard TextMate &lt;code&gt;Select &amp;gt; Enclosing Brackets&lt;/code&gt; functionality.&lt;/p&gt;


	&lt;p&gt;I call it &lt;strong&gt;Select Balanced &lt;span class="caps"&gt;HTML &lt;/span&gt;Tag&lt;/strong&gt; and I have it bound to &lt;strong&gt;&lt;nobr&gt;&amp;#x2318;&amp;#x21E7;B&lt;/nobr&gt;&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s bring up TextMate&lt;br&gt;
Put the caret inside of an &lt;span class="caps"&gt;HTML&lt;/span&gt; tag that we want to select, and hit the magic shortcut key: &lt;strong&gt;&lt;nobr&gt;&amp;#x2318;&amp;#x21E7;B&lt;/nobr&gt;&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;And she-bang! We have our tag selected.&lt;/p&gt;


	&lt;p&gt;Then you can keep hitting the keystroke to expand your selection to each succesive enclosing tag.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;BUT&lt;/span&gt; wait, there&amp;#8217;s more!&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;My &amp;#8220;Select Balanced &lt;span class="caps"&gt;HTML &lt;/span&gt;Tag&amp;#8221; macro is &lt;span class="caps"&gt;UNDOABLE&lt;/span&gt;!&lt;/em&gt;&lt;br&gt;
&lt;span class="caps"&gt;HAHA&lt;/span&gt;! Take &lt;span class="caps"&gt;THAT HTML&lt;/span&gt;! Bet you didn&amp;#8217;t see &lt;span class="caps"&gt;THAT&lt;/span&gt; one coming!&lt;/p&gt;


	&lt;p&gt;Yes, sure. Dreamweaver has the &amp;#8220;Edit &gt; Select Child&amp;#8221; command, but I find that it doesnt actually DO anything most of the time.&lt;/p&gt;


	&lt;p&gt;I must admit however that the Dreamweaver and BBEdit versions of this command actually work a &lt;span class="caps"&gt;LOT&lt;/span&gt; better and &lt;span class="caps"&gt;WAY WAY&lt;/span&gt; faster, but I find that reasoning completely useless because I&amp;#8217;m never goign to be using either of those applications.&lt;/p&gt;


	&lt;p&gt;So to sum up. 
New TextMate Macro &lt;strong&gt;Select Balanced &lt;span class="caps"&gt;HTML &lt;/span&gt;Tag&lt;/strong&gt;
Selects the current &lt;span class="caps"&gt;HTML &lt;/span&gt;Tag, 
similar to the &lt;em&gt;BBEdit Balance&lt;/em&gt; and &lt;em&gt;Dreamweaver Select Parent Tag&lt;/em&gt; commands.
Except that it&amp;#8217;s &lt;span class="caps"&gt;UNDOABLE&lt;/span&gt; and works in TextMate and is much crappier.&lt;br&gt;
Written by me, Thomas Aylott.&lt;/p&gt;


	&lt;p&gt;You can download this at &lt;strong&gt;&lt;a href="http://BundleForge.com"&gt;BundleForge.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <pubDate>Thu, 15 Nov 2007 08:21:00 PST</pubDate>
      <guid>&lt;a href="/articles/2007/11/15/select-balanced-html-tag"&gt;Select Balanced HTML Tag&lt;/a&gt;</guid>
      <link>&lt;a href="/articles/2007/11/15/select-balanced-html-tag"&gt;Select Balanced HTML Tag&lt;/a&gt;</link>
    </item>
  </channel>
</rss>
