PlainTasks icon indicating copy to clipboard operation
PlainTasks copied to clipboard

In place filtering of tasks and projects in the text file

Open wakatara opened this issue 12 years ago • 6 comments

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.

wakatara avatar Feb 27 '13 01:02 wakatara

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!

aziz avatar Feb 28 '13 11:02 aziz

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.

wakatara avatar Feb 28 '13 12:02 wakatara

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.

wakatara avatar Aug 22 '13 13:08 wakatara

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.

aziz avatar Aug 22 '13 13:08 aziz

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.

wakatara avatar Aug 23 '13 05:08 wakatara

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...

wakatara avatar Aug 23 '13 05:08 wakatara