[TxMt] GTD2 cleanup patch

Bill Bumgarner bbum at mac.com
Fri Oct 27 20:47:23 UTC 2006


It was bothering me that the cleanup command in GTD2 wasn't  
preserving whitespace before projects.  I.e. this...


* Foo
- bar

* Baz
- bob

- fred

Would be turned into:

* Foo
- bar
* Baz
- bob
- fred

This "fixes" it in a way that'll likely be laughed at.  Point and  
laugh away, it works for me... :-)

b.bum

Index: GTD2.tmbundle/Commands/Cleanup.tmCommand
===================================================================
--- GTD2.tmbundle/Commands/Cleanup.tmCommand	(revision 5658)
+++ GTD2.tmbundle/Commands/Cleanup.tmCommand	(working copy)
@@ -17,7 +17,11 @@
    if (myTest.pre_match != "+" and myTest.pre_match.length > 0)
      puts line
    else
-    myDone = myDone + line
+    if (line != "\n")
+	    myDone = myDone + line
+	else
+        puts "\n"
+	end
    end
end
puts myDone</string>




More information about the textmate mailing list