<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Zeroed and Noughted &#187; TextMate</title>
	<atom:link href="http://zeroedandnoughted.com/category/software/textmate/feed/" rel="self" type="application/rss+xml" />
	<link>http://zeroedandnoughted.com</link>
	<description>0000000000000000000000000000000000</description>
	<lastBuildDate>Fri, 26 Aug 2011 11:12:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>CSS3 TextMate Bundle</title>
		<link>http://zeroedandnoughted.com/css3-textmate-bundle/</link>
		<comments>http://zeroedandnoughted.com/css3-textmate-bundle/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 13:31:24 +0000</pubDate>
		<dc:creator>booshtukka</dc:creator>
				<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://zeroedandnoughted.com/?p=269</guid>
		<description><![CDATA[I&#8217;ve combined the previous CSS3 TextMate Snippets into a bundle, which was a lot easier to do than I thought it would be. I&#8217;ll detail how to make your own in a future post. The bundle I&#8217;ve created plays nicely with existing CSS snippets that are bundled with TextMate. I&#8217;ve included: background horizontal linear gradient [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve combined the previous CSS3 TextMate Snippets into a bundle, which was a lot easier to do than I thought it would be. I&#8217;ll detail how to make your own in a future post.</p>
<p>The bundle I&#8217;ve created plays nicely with existing CSS snippets that are bundled with TextMate. I&#8217;ve included:</p>
<ul>
<li>background horizontal linear gradient</li>
<li>background vertical linear gradient</li>
<li>border-radius bottom left</li>
<li>border-radius bottom right</li>
<li>border-radius top left</li>
<li>border-radius top right</li>
<li>border-radius</li>
<li>box-shadow</li>
</ul>
<p>You can download the bundle below.</p>
<p><a href='http://zeroedandnoughted.com/wp-content/uploads/2010/09/CSS3.tmbundle.zip'>Download CSS3.tmbundle</a>.</p>
<p>Let me know how you get on, and if there any other properties you&#8217;d like me to add.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeroedandnoughted.com/css3-textmate-bundle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS3 Snippets in TextMate &#8211; Linear Gradients</title>
		<link>http://zeroedandnoughted.com/css3-snippets-in-textmate-linear-gradients/</link>
		<comments>http://zeroedandnoughted.com/css3-snippets-in-textmate-linear-gradients/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 14:22:29 +0000</pubDate>
		<dc:creator>booshtukka</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://zeroedandnoughted.com/?p=261</guid>
		<description><![CDATA[Gradients are great. Linear gradients are super-great, because (as long as you don&#8217;t want funky angles) they work on pretty much all current browsers if you can remember the syntax. I can&#8217;t remember the syntax, but with a little home-schooling TextMate can… Create these 2 snippets within TextMate&#8217;s CSS scope: Name: background: vertical linear gradient [...]]]></description>
			<content:encoded><![CDATA[<p>Gradients are great. Linear gradients are super-great, because (as long as you don&#8217;t want funky angles) they work on pretty much all current browsers if you can remember the syntax. I can&#8217;t remember the syntax, but with a little home-schooling TextMate can…</p>
<p>Create these 2 snippets within TextMate&#8217;s CSS scope:</p>
<p><code class="block"></p>
<dl>
<dt>Name:</dt>
<dd>background: vertical linear gradient</dd>
<dt>Tab trigger:</dt>
<dd>background</dd>
<dt>Scope Selector:</dt>
<dd>source.css</dd>
<dt>Snippet:</dt>
<dd>
<pre class="brush: css; title: ;">background: ${1:top-color};
background: -webkit-gradient(linear, left top, left bottom, from(${1:top-color}), to(${2:bottom-color}));
background: -moz-linear-gradient(top, ${1:top-color}, ${2:bottom-color});
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=${1:top-color}, endColorstr=${2:bottom-color});
-ms-filter: &amp;quot;progid:DXImageTransform.Microsoft.gradient(startColorstr=${1:top-color}, endColorstr=${2:bottom-color})&amp;quot;;
$3</pre>
</dd>
</dl>
<p></code></p>
<p><code class="block"></p>
<dl>
<dt>Name:</dt>
<dd>background: horizontal linear gradient</dd>
<dt>Tab trigger:</dt>
<dd>background</dd>
<dt>Scope Selector:</dt>
<dd>source.css</dd>
<dt>Snippet:</dt>
<dd>
<pre class="brush: css; title: ;">background: ${1:left-color};
background: -webkit-gradient(linear, left top, right top, from(${1:left-color}), to(${2:right-color}));
background: -moz-linear-gradient(left top, ${1:left-color}, ${2:right-color});
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=${1:left-color}, endColorstr=${2:right-color}, GradientType=1);
-ms-filter: &amp;quot;progid:DXImageTransform.Microsoft.gradient(startColorstr=${1:left-color}, endColorstr=${2:right-color}, GradientType=1)&amp;quot;;
$3</pre>
</dd>
</dl>
<p></code></p>
<p>Now, typing <code>background</code> within a CSS context and pressing <kbd>tab</kbd> should show something like this:</p>
<p><img style="display:block; margin-left:auto; margin-right:auto;" src="http://zeroedandnoughted.com/wp-content/uploads/2010/08/background.jpg" alt="background.jpg" border="0" width="516" height="334" /></p>
<p>Choosing one of the two new options at the bottom will give you all the code you need for most browsers to show a horizontal or vertical linear gradient. The first colour you enter (either the top-most or left-most colour) will become the default background for browsers that don&#8217;t support gradients, which is hopefully usually what you want. In case you were wondering, <code>-ms-filter</code> is specifically for IE8 (in IE8-mode) which requires quotes around the contents.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeroedandnoughted.com/css3-snippets-in-textmate-linear-gradients/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS3 Snippets in TextMate &#8211; box-shadow</title>
		<link>http://zeroedandnoughted.com/css3-snippets-in-textmate-box-shadow/</link>
		<comments>http://zeroedandnoughted.com/css3-snippets-in-textmate-box-shadow/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 12:25:57 +0000</pubDate>
		<dc:creator>booshtukka</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://www.zeroedandnoughted.com/?p=221</guid>
		<description><![CDATA[As promised, the next in the series – box-shadow. Create this snippets within CSS: Name: box-shadow Tab trigger: box-shadow Snippet: -moz-box-shadow: ${1:hOffset} ${2:vOffset} ${3:blurRadius} ${4:color}; -webkit-box-shadow: ${1:hOffset} ${2:vOffset} ${3:blurRadius} ${4:color}; box-shadow: ${1:hOffset} ${2:vOffset} ${3:blurRadius} ${4:color}; $0 More to come. Any requests?]]></description>
			<content:encoded><![CDATA[<p>As promised, the next in the series – <code>box-shadow</code>.</p>
<p>Create this snippets within CSS:</p>
<p><code class="block"></p>
<dl>
<dt>Name:</dt>
<dd>box-shadow</dd>
<dt>Tab trigger:</dt>
<dd>box-shadow</dd>
<dt>Snippet:</dt>
<dd>
<pre class="brush: css; title: ;">-moz-box-shadow: ${1:hOffset} ${2:vOffset} ${3:blurRadius} ${4:color};
-webkit-box-shadow: ${1:hOffset} ${2:vOffset} ${3:blurRadius} ${4:color};
box-shadow: ${1:hOffset} ${2:vOffset} ${3:blurRadius} ${4:color};
$0</pre>
</dd>
</dl>
<p></code></p>
<p>More to come. Any requests?</p>
]]></content:encoded>
			<wfw:commentRss>http://zeroedandnoughted.com/css3-snippets-in-textmate-box-shadow/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS3 Snippets in TextMate – border-radius</title>
		<link>http://zeroedandnoughted.com/css3-snippets-in-textmate-%e2%80%93%c2%a0border-radius/</link>
		<comments>http://zeroedandnoughted.com/css3-snippets-in-textmate-%e2%80%93%c2%a0border-radius/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 16:20:00 +0000</pubDate>
		<dc:creator>booshtukka</dc:creator>
				<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://www.zeroedandnoughted.com/?p=213</guid>
		<description><![CDATA[I don&#8217;t have the best memory in the world. I am incapable of remembering the exact syntax for most CSS properties, let alone the vendor specific versions of them. To that end I have started creating TextMate snippets to help me out. text-shadow comes by default, but border-radius does not. Create these 5 snippets within [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t have the best memory in the world. I am incapable of remembering the exact syntax for most CSS properties, let alone the vendor specific versions of them. To that end I have started creating TextMate snippets to help me out.</p>
<p><code>text-shadow</code> comes by default, but <code>border-radius</code> does not.</p>
<p>Create these 5 snippets within CSS:</p>
<p><code class="block"></p>
<dl>
<dt>Name:</dt>
<dd>border-radius</dd>
<dt>Tab trigger:</dt>
<dd>border-radius</dd>
<dt>Snippet:</dt>
<dd>
<pre class="brush: css; title: ;">border-radius: ${1:radius};
-moz-border-radius: ${1:radius};
-webkit-border-radius: ${1:radius};
$0</pre>
</dd>
</dl>
<p></code></p>
<p><code class="block"></p>
<dl>
<dt>Name:</dt>
<dd>border-top-left-radius</dd>
<dt>Tab trigger:</dt>
<dd>border-radius</dd>
<dt>Snippet:</dt>
<dd>
<pre class="brush: css; title: ;">border-top-left-radius: ${1:radius};
-moz-border-radius-topleft: ${1:radius};
-webkit-border-top-left-radius: ${1:radius};
$0</pre>
</dd>
</dl>
<p></code></p>
<p><code class="block"></p>
<dl>
<dt>Name:</dt>
<dd>border-top-right-radius</dd>
<dt>Tab trigger:</dt>
<dd>border-radius</dd>
<dt>Snippet:</dt>
<dd>
<pre class="brush: css; title: ;">border-top-right-radius: ${1:radius};
-moz-border-radius-topright: ${1:radius};
-webkit-border-top-right-radius: ${1:radius};
$0</pre>
</dd>
</dl>
<p></code></p>
<p><code class="block"></p>
<dl>
<dt>Name:</dt>
<dd>border-bottom-left-radius</dd>
<dt>Tab trigger:</dt>
<dd>border-radius</dd>
<dt>Snippet:</dt>
<dd>
<pre class="brush: css; title: ;">${1:radius};
-moz-border-radius-bottomleft: ${1:radius};
-webkit-border-bottom-left-radius: ${1:radius};
$0</pre>
</dd>
</dl>
<p></code></p>
<p><code class="block"></p>
<dl>
<dt>Name:</dt>
<dd>border-bottom-right-radius</dd>
<dt>Tab trigger:</dt>
<dd>border-radius</dd>
<dt>Snippet:</dt>
<dd>
<pre class="brush: css; title: ;">${1:radius};
-moz-border-radius-bottomright: ${1:radius};
-webkit-border-bottom-right-radius: ${1:radius};
$0</pre>
</dd>
</dl>
<p></code></p>
<p>Now, anywhere that is a CSS context (inside a CSS file or inside <code>style</code> tags in an HTML file) type <kbd>border-radius</kbd> and press <kbd>tab</kbd>. TextMate asks which of our five snippets you want. Choose the appropriate one by typing the number alongside it, and the code appears. Now type the radius you want (don&#8217;t forget, you can enter two values if you want the equivalent of an elliptical radius) and it will automatically appear for all vendor-specific code. Finally, press <kbd>tab</kbd> again and your cursor jumps outside of the code we just typed.</p>
<p>I&#8217;ll provide more of these as I make them.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeroedandnoughted.com/css3-snippets-in-textmate-%e2%80%93%c2%a0border-radius/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using previously highlighted text in TextMate snippets</title>
		<link>http://zeroedandnoughted.com/using-previously-highlighted-text-in-textmate-snippets/</link>
		<comments>http://zeroedandnoughted.com/using-previously-highlighted-text-in-textmate-snippets/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 23:59:41 +0000</pubDate>
		<dc:creator>booshtukka</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://www.zeroedandnoughted.com/?p=75</guid>
		<description><![CDATA[In a previous (and very verbose) post on TextMate snippets, I showed a snippet to easily and simply use a tab trigger to insert a try... catch statement. If you missed it feel free to catch up here. The idea was that you type in try, press tab and TextMate spits out: try { } [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous (and very verbose) post on TextMate snippets, I showed a snippet to easily and simply use a tab trigger to insert a <code>try... catch</code> statement. If you missed it feel free to catch up <a href="http://www.zeroedandnoughted.com/?p=10">here</a>. The idea was that you type in <code>try</code>, press <kbd>tab</kbd> and TextMate spits out:</p>
<pre class="brush: jscript; title: ;">
try {

} catch(e) {

}
</pre>
<p>Now, the cursor is automatically positioned inside the <code>try</code> block, and the next time you press <kbd>tab</kbd> it moves to the <code>catch</code> block. Pressing <kbd>tab</kbd> again moves you outside the block. This is great, but not hugely useful in the real world. What would be more likely than writing an empty <code>try... catch</code> statement up-front would be to write some code, and choose to surround it in the <code>try</code> block. I promised to tell you how to do that, and it is much simpler than I thought.</p>
<p>The answer is the TextMate variable <code>$TM_SELECTED_TEXT</code>. It does exactly what it says it does, but you can&#8217;t use a tab trigger to achieve our goal here. Highlight some text, and start typing and of course, the text is overwritten. In this instance, a tab trigger will not do. You need to use a &quot;Key Equivalent&quot; (or hotkey or shortcut key to the rest of us). In my instance, I have more than enough of those to remember already, thankyouverymuch, and so I highlight the text and do one of the following:</p>
<ul>
<li>Click the Bundle menu item at the top of the screen and drill down to my snippet</li>
<li>Press <kbd>Ctrl+Escape</kbd> and drill down to my snippet</li>
<li>Or, my favourite, press <kbd>Ctrl+Command+T</kbd> to bring up a list of all the snippets, type &quot;try&quot; to filter the list, and press <kbd>return</kbd></li>
</ul>
<p>There is nothing to stop you just typing <code>try</code> and pressing <kbd>return</kbd> either.</p>
<p>Here is the final snippet:</p>
<p><code class="block"></p>
<dl>
<dt>Name:</dt>
<dd>try ... catch</dd>
<dt>Tab trigger:</dt>
<dd>try</dd>
<dt>Snippet:</dt>
<dd>
<pre class="brush: jscript; title: ;">try {
	$TM_SELECTED_TEXT$1
} catch(e) {
	$2
}
</pre>
</dd>
</dl>
<p></code></p>
<div style="text-align:center;"><img src="http://zeroedandnoughted.com/wp-content/uploads/2009/01/textmatebundle-editor-2.jpg" alt="try... catch TextMate Bundle Editor Example"  border="0" width="495" height="389" /></div>
<p>Note that there should be a trailing extra carriage return, to ensure the final <kbd>tab</kbd> takes us out on to the line following the block.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeroedandnoughted.com/using-previously-highlighted-text-in-textmate-snippets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Snippets in TextMate</title>
		<link>http://zeroedandnoughted.com/javascript-snippets-in-textmate/</link>
		<comments>http://zeroedandnoughted.com/javascript-snippets-in-textmate/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 08:29:41 +0000</pubDate>
		<dc:creator>booshtukka</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://zeroedandnoughted.wordpress.com/?p=10</guid>
		<description><![CDATA[So, I finally started getting into snippets in TextMate. If you haven&#x27;t played with TextMate &#8211; it&#x27;s described by its publisher MacroMates as The Missing Editor for Mac OS X. I&#x27;d have to agree, after messing with probably 30 or more IDEs by now &#8211; it&#x27;s the only one that stays simple and true and [...]]]></description>
			<content:encoded><![CDATA[<p>So, I finally started getting into snippets in TextMate. If you haven&#x27;t played with TextMate &#8211; it&#x27;s described by its publisher <cite>MacroMates</cite> as <q>The Missing Editor for Mac OS X</q>. I&#x27;d have to agree, after messing with probably 30 or more <acronym title="Integrated Development Environment">IDE</acronym>s by now &#8211; it&#x27;s the only one that stays simple and true and easy, until you try to do something complicated. Only then do you really realise the ridiculous amount of power under the hood. I could imagine three day long courses on this thing. You can get a 30 day trial from <a title="TextMate — The Missing Editor for Mac OS X" href="http://macromates.com" target="_blank">here</a>, and it&#x27;s only &euro;50 to buy which is an absolute bargain in anyone&#x27;s money. It&#x27;s OS X only, but e-TextEditor purports to do the same thing for Windows, even supporting bundles (the plug-in format). You can read more about that <a title="E - TextEditor | The power of TextMate on Windows" href="http://www.e-texteditor.com/">here</a> &#8211; but I can&#x27;t vouch for it, having not played with it. Anyway, I digress. TextMate (and apparently e-TextEditor) supports &quot;Snippets&quot; &#8211; which allow you to type something short (the &quot;Tab trigger&quot;), press the <kbd>tab</kbd> key, and have it auto-complete to something more complicated. The simplest example of this &#8211; type in:</p>
<p><kbd>lorem</kbd></p>
<p>and press <kbd>tab</kbd>, and TextMate spits out:</p>
<p><code class="block">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</code></p>
<p>Pretty cool, right? It even moves the keyboard caret focus to straight after the newly inserted text. We can go a bit further, and include &quot;Tab stops&quot;. These tell TextMate how to behave immediately after pressing <kbd>tab</kbd> the first time, to auto-complete, and the following consecutive times. For an <code>if</code> block, for example, you probably want to start typing your condition within the brackets following the <code>if</code>, and then start typing inside the braces. TextMate will automatically do this for you &#8211; make sure you have a .js file open, anywhere in the document type:</p>
<p><kbd>if</kbd></p>
<p>&#8230;and press <kbd>tab</kbd>, and you&#x27;ll get:</p>
<p><code class="block">if (true) {};</code></p>
<p>&#8230;and &quot;true&quot; will be automatically highlighted. Press <kbd>tab</kbd> after you&#x27;ve typed in your conditional statement, and the caret is moved inside the braces! This is all pretty great, but there were a few snippets missing, or not working just as I would like, so I&#x27;ve made them myself.</p>
<p>To create a snippet, open up TextMate. Under the &quot;Bundles&quot; menu, select &quot;Bundle Editor&quot;, then &quot;Edit Snippets&quot;. You&#x27;ll see a long list of all the code types that TextMate understands &#8211; you&#x27;ll want to find and expand &quot;JavaScript&quot;. When creating a new snippet, click the plus symbol underneath the list and choose &quot;New Snippet&quot;. Give it a name (this doesn&#x27;t affect your tab trigger, although if you choose to have a menu of potential snippets for one tab trigger, the name is what will show there. See my &quot;Lorem Ipsum&quot; example at the end of this post on how to do that). The code for the snippet goes in the big box (click the question mark for help with the syntax). Everything else should already be selected correctly, And you just type the text that you want TextMate to react to in the text box next to &quot;Activation&quot;.</p>
<p>Firstly, I modified the existing <code>for</code> loop snippet, to improve performance by just checking the property we&#x27;re comparing our counter against once, instead of with every iteration. This is already well documented so I won&#x27;t go into it further &#8211; but here&#x27;s the amended snippet:</p>
<p><code class="block">Name: for (...) {...}<br />
Tab trigger: for<br />
Snippet:<br />
for (var ${20:i}=0, ${21:j}=${1:Things}.length; ${20:i} &lt; ${21:j}; ${20:i}++) {<br />
${100:${1:Things}[${20:i}]}$0<br />
};</code></p>
<p>Then, I made a snippet for the <code>switch</code> operator.</p>
<p><code class="block">Name: switch<br />
Tab trigger: switch<br />
Snippet:<br />
switch (${1}) {<br />
case &quot;${2}&quot; :<br />
${3}<br />
break;<br />
case &quot;${4}&quot; :<br />
${5}<br />
break;<br />
default :<br />
}</code></p>
<p>I adjusted, and possibly fixed the <code>setTimeout</code> snippet (I wouldn&#x27;t go so far as to say it was broken &#8211; TextMate is quite mature by now, and the developers are clearly very good, but the tab stop order was confusing to me, and there seemed to be an unnecessary one in there):</p>
<p><code class="block">Name: setTimeout function<br />
Tab trigger: timeout<br />
Snippet:<br />
setTimeout(function() {$1}, ${2:10});</code></p>
<p>I created a <code>for in</code> loop snippet:</p>
<p><code class="block">Name: for in<br />
Tab trigger: forin<br />
Snippet:<br />
for (var ${1:key} in ${2:object}) {<br />
${3:${2:object}[${1:key}]}<br />
}</code></p>
<p>A <code>try catch</code> snippet:</p>
<p><code class="block">Name: tray catch<br />
Tab trigger: try<br />
Snippet:<br />
try {<br />
$1<br />
} catch(e) {<br />
$2<br />
}</code></p>
<p>And finally, since I was on a roll and can never remember the syntax &#8211; the ternary operator:</p>
<p><code class="block">Name: ternary<br />
Tab trigger: ?<br />
Snippet:<br />
${1:condition} ? ${2:if true} : ${3:if false}</code></p>
<p>I also wanted to improve the Lorem Ipsum snippet. The point of Lorem Ipsum text is that it represents nothing more than a blob of text &#8211; you (or, I, at least) can&#x27;t read it, so you don&#x27;t associate it with anything, and it is therefore perfect for layout: you see the layout, you don&#x27;t read the text. But, if you keep re-inserting the exact same block of text, patterns will form in your document, and it will not have the intended effect of looking like nondescript text. <a href="http://www.lipsum.com">www.lipsum.com</a> have a very good Lorem Ipsum generator, that can create multiple paragaphs which do not have to begin with &quot;Lorem ipsum&quot;. Rather than looking these up all the time, I copied few random ones, and just made a pile of snippets with the same tab trigger (&quot;lorem&quot;) as the original one, which has the affect of showing a menu when you press tab, with all the snippets associated with that tab trigger as all your different options in the menu. I named them &quot;Lorem ipsum 1&quot;, &quot;Lorem ipsum 2&quot;, &quot;Lorem ipsum 3&quot;, &quot;Lorem ipsum (short) 1&quot;, &quot;Lorem ipsum (long) 1&quot;, etc and applied them to &quot;Plain Text&quot; rather than &quot;JavaScript&quot;.</p>
<p>To see all of these working, first make sure TextMate understands your file is a JavaScript file &#8211; there&#x27;s a drop-down (drop-up in this instance) menu at the bottom of the TextMate window, that defaults to &quot;Plain Text&quot; for new files &#8211; you&#x27;ll want to select &quot;JavaScript&quot; from this list (though the &quot;lorem&quot; tab trigger should work in any document). Then type any of the tab triggers we have defined (it&#x27;s case sensitive) and press <kbd>tab</kbd>! My next task is going to be doing this for all those pesky HTML tags I can never remember the exact syntax for, and getting the <code>try catch</code> snippet to surround highlighted text if you have some selected.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeroedandnoughted.com/javascript-snippets-in-textmate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

