<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Blogo Baggins - Latest Comments in Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.disqus.com/</link><description></description><atom:link href="https://blogobaggins.disqus.com/waging_war_on_whitespace_using_textmate/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 08 Mar 2013 09:57:58 -0000</lastBuildDate><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-822993695</link><description>&lt;p&gt;Try adding -text.html.markdown to the macro's Scope Selector.  After that, if you want to clean up whitespace in markdown files manually, call TextMate's "Remove Trailing Spaces in Document" command.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chmurph2</dc:creator><pubDate>Fri, 08 Mar 2013 09:57:58 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-822817754</link><description>&lt;p&gt;Disabling it for Markdown is just fine (that's actually what I meant, but I used a longer vaguer word, like a pillock). How would you disable it just for markdown?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Robinson</dc:creator><pubDate>Fri, 08 Mar 2013 05:44:38 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-816688152</link><description>&lt;p&gt;Hi Matt,&lt;/p&gt;&lt;p&gt;No, not that I'm aware of with TextMate.  You can completely disable it for Markdown, though, but then you have to clean up unwanted whitespace manually.&lt;/p&gt;&lt;p&gt;HTH,&lt;br&gt;Chris&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chmurph2</dc:creator><pubDate>Fri, 01 Mar 2013 13:07:44 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-816380093</link><description>&lt;p&gt;Is there any way to make this selective? Mostly because Markdown uses trailing whitespace to indicate a line-break. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Robinson</dc:creator><pubDate>Fri, 01 Mar 2013 06:29:21 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-641992563</link><description>&lt;p&gt;Perfect&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hi</dc:creator><pubDate>Thu, 06 Sep 2012 10:27:56 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-436879244</link><description>&lt;p&gt;although it doesn't save the document :( just strips the whitespace&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bseanvt</dc:creator><pubDate>Sun, 12 Feb 2012 12:14:10 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-436864274</link><description>&lt;p&gt;You can achieve the same thing by adding a new command that replaces the entire document. Something like... &lt;br&gt;#!/usr/bin/ruby&lt;br&gt;STDIN.read.each_line do |line|&lt;br&gt;  puts line.rstrip&lt;br&gt;end&lt;/p&gt;&lt;p&gt;Full example here&lt;br&gt;&lt;a href="https://gist.github.com/1809560" rel="nofollow noopener" target="_blank" title="https://gist.github.com/1809560"&gt;https://gist.github.com/180...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bseanvt</dc:creator><pubDate>Sun, 12 Feb 2012 11:44:31 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-381680605</link><description>&lt;p&gt;One interesting thing to note on the tabs vs. spaces thing is that an automatic conversion will break Makefiles, which require you use tabs.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Graham Scott Christensen</dc:creator><pubDate>Wed, 07 Dec 2011 20:09:31 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-304224749</link><description>&lt;p&gt;Ah, good.  This was so easy to do in Textpad on Windows.  Thank you.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aaron Tate</dc:creator><pubDate>Wed, 07 Sep 2011 10:42:58 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-280050343</link><description>&lt;p&gt;Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chmurph2</dc:creator><pubDate>Sun, 07 Aug 2011 19:55:13 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-279847614</link><description>&lt;p&gt;This is excellent! I've been waging the war against whitespace for quite some time now! Thanks :)!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stan Schwertly</dc:creator><pubDate>Sun, 07 Aug 2011 15:05:08 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-225685620</link><description>&lt;p&gt;Hi Jeremy,&lt;/p&gt;&lt;p&gt;I've added "-text.html.markdown -text" to my macro's Scope Selector for the&lt;br&gt;same reasons.  Whenever I'm dealing with plain text and I want whitespace&lt;br&gt;cleaned up, I just manually call TextMate's "Remove Trailing Spaces in&lt;br&gt;Document" command.&lt;/p&gt;&lt;p&gt;-Chris&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chmurph2</dc:creator><pubDate>Tue, 14 Jun 2011 09:49:44 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-225429450</link><description>&lt;p&gt;I'm all for this. I compulsively remove trailing whitespaces in my source code. I've had this "on save" hook for some time, but I've had issues with TSV (tab separated values) files, where a trailing tab means that the last column is empty. Removing those tabs corrupt the file.&lt;/p&gt;&lt;p&gt;I didn't try to use a "text.source" in TextMate yet. It seems like a good idea.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jlecour</dc:creator><pubDate>Tue, 14 Jun 2011 01:15:35 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-175967133</link><description>&lt;p&gt;Thanks Tony.  And... yes, exactly.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chmurph2</dc:creator><pubDate>Thu, 31 Mar 2011 23:01:46 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-172684514</link><description>&lt;p&gt;Good shit, thank you for this. The trick here was creating a command that simply does a save, then using that in a macro. Endless possibilities for do "stuff" on save.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tony4d</dc:creator><pubDate>Sun, 27 Mar 2011 02:40:39 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-132962202</link><description>&lt;p&gt;You're welcome.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chmurph2</dc:creator><pubDate>Sat, 22 Jan 2011 13:22:51 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-132694967</link><description>&lt;p&gt;I was doing this manually all the time when I realized there had to be a better way and started Googling... And here it is! Thank you!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alec</dc:creator><pubDate>Fri, 21 Jan 2011 20:41:15 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-105068155</link><description>&lt;p&gt;You're welcome.  Glad it helped.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chmurph2</dc:creator><pubDate>Tue, 30 Nov 2010 10:22:07 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-105032876</link><description>&lt;p&gt;I'm a little late to the party, but thanks a lot for this. I've been wanting to do this forever and never got around to do it this simply.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Indy</dc:creator><pubDate>Tue, 30 Nov 2010 07:27:04 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-82072882</link><description>&lt;p&gt;Amen. This is one of the first things I did after switching to TextMate years ago.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tom</dc:creator><pubDate>Wed, 29 Sep 2010 15:05:57 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-80558648</link><description>&lt;p&gt;A nice alternative approach.  Thanks!&lt;/p&gt;&lt;p&gt;-Chris&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chmurph2</dc:creator><pubDate>Fri, 24 Sep 2010 10:44:47 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-80488295</link><description>&lt;p&gt;I use the same kind of solution in TextMate but with a custom command to add newline before EOF additionally to removing trailing whitespace. The command looks like this. (Mind the escaped verbatim newline in the command)&lt;/p&gt;&lt;p&gt;    sed -E -e 's/[	 ]+$//' -e '$ s/^(.*)$[^\n]/\1\&lt;br&gt;/'&lt;/p&gt;&lt;p&gt;create this with save: nothing, input: entire document, output: replace document, and use it in your macro instead of the builtin "Remove Trailing Spaces" command.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">László Bácsi</dc:creator><pubDate>Fri, 24 Sep 2010 02:46:57 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-80487786</link><description>&lt;p&gt;That's somewhat easy to fix. Specify a 'text.source' scope for the macro. That way the shortcut will only work in source documents and Cmd-S will do the default in other documents.&lt;/p&gt;&lt;p&gt;You could specify further scopes if you'd like to have this feature in other files (e.g. haml)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">László Bácsi</dc:creator><pubDate>Fri, 24 Sep 2010 02:41:01 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-57916405</link><description>&lt;p&gt;Nice!  And thanks for the reference.&lt;/p&gt;&lt;p&gt;-Chris&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chmurph2</dc:creator><pubDate>Mon, 21 Jun 2010 13:43:25 -0000</pubDate></item><item><title>Re: Waging War on Whitespace (using TextMate)</title><link>http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html#comment-57915687</link><description>&lt;p&gt;I've bundled this macro up (including Convert Tabs to Spaces) for Textmate @ &lt;a href="http://github.com/glennr/uber-glory-tmbundle" rel="nofollow noopener" target="_blank" title="http://github.com/glennr/uber-glory-tmbundle"&gt;http://github.com/glennr/ub...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Share and enjoy!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Glenn Roberts</dc:creator><pubDate>Mon, 21 Jun 2010 13:38:11 -0000</pubDate></item></channel></rss>