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>
Bill -
I never thought about empty lines in a file - I usually just have a laundry list, or break stuff out into smaller project files. My code intentionally removes whitespace, to prevent the occasional empty line at te bottom of the listfrom growing. Maybe we need to look at creating some kind of plist to cover this?
Mike
On 10/27/06, Bill Bumgarner bbum@mac.com wrote:
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"
endend
end puts myDone</string>
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Oct 27, 2006, at 2:50 PM, Mike Mellor wrote:
I never thought about empty lines in a file - I usually just have a laundry list, or break stuff out into smaller project files. My code intentionally removes whitespace, to prevent the occasional empty line at te bottom of the listfrom growing. Maybe we need to look at creating some kind of plist to cover this?
Maybe I just have a different usage pattern. So far, I seem to have two separate files of GTD items:
personal.gtd apple.gtd
Within those, I have multiple projects with todo items under each project. I'm using pretty much the same set of contexts that were provided out of box.
I like a little bit of whitespace between projects, but am not particular attached to whitespace anywhere else. Frankly, I would like the cleanup to automatically create *Project entries in the "done" list at the bottom, but I'm leaning more to just deleting the Done items as noise.
b.bum
There is a command (I can't remember its exact name right now, I'm not on my iBook) that will do exactly what you want - take all of the DONE tasks and move them to the bottom of the list. It just doen't keep the whitespace. I think it is CTRL-SHIFT-C, where CTRL-OPT-SHIFT-C removes DONE tasks. Does that work for you?
Mike
On 10/27/06, Bill Bumgarner bbum@mac.com wrote:
I like a little bit of whitespace between projects, but am not particular attached to whitespace anywhere else. Frankly, I would like the cleanup to automatically create *Project entries in the "done" list at the bottom, but I'm leaning more to just deleting the Done items as noise.
b.bum
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Oct 27, 2006, at 5:07 PM, Mike Mellor wrote:
There is a command (I can't remember its exact name right now, I'm not on my iBook) that will do exactly what you want - take all of the DONE tasks and move them to the bottom of the list. It just doen't keep the whitespace. I think it is CTRL-SHIFT-C, where CTRL- OPT-SHIFT-C removes DONE tasks. Does that work for you?
ctrl-shift-c is the command that the patch applies to; it moves the done tasks to the bottom, preserving whitespace between projects and in existing todo lists.
b.bum