<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: Adamsalter's Code Snippets</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 05 Oct 2008 22:51:00 GMT</pubDate>
    <description>DZone Snippets: Adamsalter's Code Snippets</description>
    <item>
      <title>TextMate - Convert Tabs to 2 Spaces and Strip Whitespace</title>
      <link>http://snippets.dzone.com/posts/show/5516</link>
      <description>Command for TextMate (or any other editor really) to strip whitespace and convert tabs...&lt;br /&gt;I only ever use 2 spaces so i've gone with that.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/usr/bin/env ruby&lt;br /&gt;&lt;br /&gt;STDIN.read.each do |line|&lt;br /&gt;  line.sub!(/^(\t+)/) { |c| '  ' * c.length }&lt;br /&gt;  line.sub!(/(\s+)$/, "\n")&lt;br /&gt;  puts line&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 19 May 2008 02:42:51 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5516</guid>
      <author>adamsalter (Adam Salter)</author>
    </item>
  </channel>
</rss>
