Closed linuxcaffe closed 9 years ago
Neat idea. Sorting in unite, or at least the sorting I've done, is done with filters uses filters. Filters don't get the arguments that are sent, but do get the option flags that are sent along. This means the input would have to be something like:
:Unite taskwarrior -custom-task-sorter=L
or
:Unite taskwarrior -custom-task-sorting=urgency-,due+
As for sharing the configuration that seems pretty straightforward and a good idea.
In (over)thinking about it, sorting is a key feature, and should be available whether or not use_taskwiki = 1. imho, we should use taskwiki sorting scheme as a model, use identical configurations.
From taskwiki.txt;
5.2.3 Sorting Tasks within the viewport are sorted in the form of the dependency tree - all the tasks that are blocking a particular task are displayed below that task, indented. The ordering of the tasks within the same level (and parent) is determined by the default sort order, see |taskwiki_sort_order|. Sort order can be customized per-viewport, in which case you need to set a alternative sort order in the |taskwiki_sort_orders| option, along with its identifier. Example: let g:taskwiki_sort_orders={"T": "project+,due-"} Using this sort order is as simple, use $[IDENTIFIER] at the end of viewport definition: ~ == Differently ordered home tasks | project:Home $T ==
but instead of
let g:taskwiki_sort_orders={"T": "project+,due-"}
it would be
let g:unite_taskwarrior_sort_orders={"T": "project+,due-"}
and where use_taskwiki = 1, then the taskwiki configs could also be respected,, (or not)
(I think I'm repeating myself, just clarifying)
(now I'm just using github as a notepad ;-)
Some possible default sort orders might be;
Sorting seems pretty important, and probably doable. I'm aiming to have this in the first release candidate.
I've done a fair bit of work on this. You should now be able to sort things using the style you've suggested. I'll work on some documentation for it. Also, fixing the travis failures that may just be due to travis using an older vim.
In my tests this is working. So I'm closing this, unless you have any other comments.
This feature inspired by taskwiki's new sorting scheme, and could potentially share the taskwiki sort configurations.
Taskwiki uses "$L" as a viewport sort directive, and "L" refers to a .vimrc configuration, for example;
and I imagine that a command
could be used to impose sort "L" on a listing.
just ":Unite taskwarrior:$" should reset the sort order to the default sort, defined something like;
I think it's worth considering using very similar, or even the same configs as taskwiki, less redundant, more consistent.