<?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>Claus Witt &#187; productivity</title> <atom:link href="http://www.clauswitt.com/tag/productivity/feed/" rel="self" type="application/rss+xml" /><link>http://www.clauswitt.com</link> <description>software and web developer</description> <lastBuildDate>Thu, 24 Jun 2010 20:07:03 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Quick Textmate Productivity Tip</title><link>http://www.clauswitt.com/quick-textmate-productivity-tip/</link> <comments>http://www.clauswitt.com/quick-textmate-productivity-tip/#comments</comments> <pubDate>Tue, 03 Mar 2009 10:15:53 +0000</pubDate> <dc:creator>Claus Witt</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[Web development]]></category> <category><![CDATA[productivity]]></category> <category><![CDATA[regexp]]></category> <category><![CDATA[textmate]]></category><guid isPermaLink="false">http://www.clauswitt.com/?p=118</guid> <description><![CDATA[Today I found myself needing a bit of Textmate magic. I had a sql-file containing a lot of tables, from some of these I needed all fieldnames in an array. I quickly found that Textmate would be my friend. This is mostly a reminder to myself. (I tend to forget these things somehow). I Pasted [...]]]></description> <content:encoded><![CDATA[<p>Today I found myself needing a bit of Textmate magic. I had a sql-file containing a lot of tables, from some of these I needed all fieldnames in an array. I quickly found that Textmate would be my friend. This is mostly a reminder to myself. (I tend to forget these things somehow).</p><p>I Pasted all the lines with fieldnames from the sql-file to a new text-document in Textmate. Then i pressed option while using the mouse to mark the beginning of each line and then inserting a quote. (Resulting in a quote on the beginning of each line.) I did the same on the other side of the textfields and added a comma as well. The only problem now is that because not all fieldnames are the same length I now have some unwanted whitespace between the end of the fieldname and the closing quote. Enter regexp, and probably the simplest one I ever wrote.</p><pre name="code" class="regexp">
[ ]
</pre><p>It simply matches all whitespace in the file. Thus making it easy to use find/replace, and replace the whitespace with nothing. Downside is, all the time I saved using this technique has been used to write this blog post. <img src='http://www.clauswitt.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://www.clauswitt.com/quick-textmate-productivity-tip/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached (user agent is rejected)
Database Caching 5/21 queries in 0.018 seconds using memcached

Served from: www.clauswitt.com @ 2010-07-30 04:30:24 -->