freitass / todo.txt-vim

Vim plugin for Todo.txt
486 stars 121 forks source link

what about filtering? #48

Open colinsullivan opened 8 years ago

colinsullivan commented 8 years ago

What about the ability to filter arbitrarily, kind of like the todo.sh ls works?

Perhaps a command you run:

:todo.txt-filter @mytag +myProject

Would then re-order the file with all of the tasks matching the query on top, and the rest in a fold below?

I have little insight into how to accomplish this with vim+python and how the folding API works. Any thoughts?

colinsullivan commented 8 years ago

ping

@freitass is this out of scope in your opinion?

freitass commented 8 years ago

Hi @colinsullivan, I didn't have the time to think about it yet. There were some attempts to implement something similar to this but I think your suggestion is the "least invasive" one. Wouldn't just sorting by context/project do the job?

colinsullivan commented 8 years ago

For example,

I want to see all my tasks in the +Next project, that have both contexts @work and @email.

If todo.txt-vim could put them all sorted together that would be good enough for me. My understanding is that this is not possible because todo.txt-vim is choosing an arbitrary method for resolving lines with multiple @contexts (just choosing the first one?)

It's approaching something like this:

https://github.com/AnthonyDiGirolamo/todotxt-machine

I'm not sure if that's where you want to go :)


Colin

On Mon, Mar 21, 2016 at 3:14 AM, Leandro Freitas notifications@github.com wrote:

Hi @colinsullivan https://github.com/colinsullivan, I didn't have the time to think about it yet. There were some attempts to implement something similar to this but I think your suggestion is the "least invasive" one. Wouldn't just sorting by context/project do the job?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/freitass/todo.txt-vim/issues/48#issuecomment-199211052

lgalke commented 7 years ago

Hey @colinsullivan , Just to let you know, I recently published gather-todo.txt, an extension to this plugin here. The core functionality is gathering and merging multiple todo.txt files (in a directory tree) in a scratch buffer. Thus, enabling some kind of agenda view in a temporary buffer.

As a nice side-effect, you can easily perform filtering in this scratch buffer with vim's basic functionality:

Maybe this helps. I would be happy to receive some kind of feedback, what further functionality the plugin should provide (dispatching?, caching?).

Best Regards, lgalke

myrdd commented 5 years ago

FYI, I'm currently using Foldsearch for (kind-of) filtering. Works for me for now, still being newbie in terms of both todotxt and vim.

See also these SE questions: