In place filtering of tasks and projects in the text file
This snippet of code has a good start on how to do in place filtering. Very handy and would work like the original Taskpaper app if we could also somehow support the nifty boolean syntax it had (ie. @week = 9 and not @done etc.)
http://superuser.com/questions/452189/how-can-i-filter-a-file-for-lines-containing-a-string-in-sublime-text-2
ciao! Daryl.
The problem with this approach is that you're actually changing the contents of file and if you press save accidentally you might lose some of the content. that's why I don't like it. I'm waiting to see some new APIs is Sublime Text 3 to be able to have multiple temporary buffers for showing different presentations of a single file!
Hmmm... Good point. I hadn't thought of that (too used to vim buffers =] ).
Just wondering if there would be some sort of easy diff, then insert type mode that would work to hack around that though. Imagine that's how Taskpaper must do it. Keep file in memory and then writes it with changes.
So does the new ST3 have those temporary buffers for showing presentation of a single file? The boolean type searches I mention above are probably the thing that keeps me on TaskPaper and not moving over to PlainTasks... the in place filtering is just too killer with TP.
You're right. Now it should be possible to build something similar in ST3. I'll mark this as a feature. Thanks for bringing this up again.
I've actually got ST3 but more a ruby guy than python, but if there's anything I can do to help make this happen coding wise, lemme know.
Sorry, I think I should have been clearer. Besides the original article I linked to in the start of this thread (http://superuser.com/questions/452189/how-can-i-filter-a-file-for-lines-containing-a-string-in-sublime-text-2) if you point me at the documentation surrounding the way you were thinking of implementing this (temporary memory buffers) I can maybe take a boo at it two weekends out...