I know this is a huge can of worms, but as a long-time taskwarrior user I know that one if it's biggest weaknesses is the lack of ancillary supporting metadata. There is as yet no way to decently describe a project, or goals or mission statements. Taskwarrior data is rich but rigid.
Not too long ago, I (re)discovered vimwiki, and have thought about various way that vimwiki and task could complement each other. This idea got enthusiastic support from core tw developers.
While full interplay is gloriously complicated, I thought we might be able to start by introducing vimwiki syntax to task annotations, Task already has a convention of using links (uri, url) in annotations, so having vimwiki highlight and handle that would be great.
The ability to use markdown and tables and folding directly in annotations would be super-great, but it will have to wait for task to properly support multi-line annotations.
Just links for now ;-)
There has also been a proposal for a default file hierarchy under ~/.task/ that would be suitable as a default location for task.wiki files, and in the following (incomplete) tree I've sprinkled imaginary wiki files;
foo/ (not every project gets a subdir here)
baz/ (not every tag gets a subdir here)
These are just a few ideas I wanted to plant, how hard would the first step be?
The first step you mean wiki for annotation? It is super easy if task support command that "add annotation from file". If not, I can't tell.
I have been using the task feature of Vimwiki for a long time, and added some additional syntax to add due dates and due times. Now I'm writing a plugin to integrate this system into taskwarrior.
For the moment it does not integrate with the vim-taskwarrior plugin, although that might change in the future. I'm currently sitll working on it, but I hope to release a first version in a few days.
Here is how it currently integrates (this already works):
In Vimwiki I can create tasks like this:
* [ ] a first task with due time (2013-11-01 12:00)
* [ ] a second task with only due date (2013-11-02)
* [ ] a third task without a due date #TW
When saving the file in vimwiki all these tasks are added into taskwarrior.
When making some modifications to the tasks (changing text, updating due date) the tasks are updated in taskwarrior accordingly.
When re-opening the file in vimwiki the tasks are updated if they were changed in taskwarrior
Also, when the task is marked as done in vimwiki ([X]) or marked as done in taskwarrior the task in the other app is updated accordingly when reading/writing the file in vimwiki.
I also plan to add an optional vimwiki page for each task, linked as an anotation to make it compatible with tasknote, but that's something I did not yet start.
Wow! That's amazing teranex! Very much how I was Imagining that part of it!
Does your implementation take-over the vimwiki todo function? I was thinking that ideally, taskwarrior tasks and regular todos might live side-by-side, although todos don't travel ;-)
One way to distinguish a todo-that-is-a-task, might be to use the ID#, so that it might look like
*  a first task with due time (2013-11-01 12:00)
* [ ] a first todo with only due date (2013-11-02)
the first one is a task, the second one a todo.. ? idonno :)
Another bonus of seeing the ID is that immediate actions can be taken with other tools.
Another thing I wanted to re-enforce, was the idea that a task install could come with an implied (or even pre-installed) file hierarchy (sketched badly above) and that future task.wiki functions could presume that.
I look forward to trying your code!
I was also thinking of instantiating that transformation from todo --> task by
a) entering the id between the "[ ]" or
b) by placing cursor over todo and executing the (nonexistent) vim-taskwarrior command ":TWWiki"
but your scheme of working will all the tasks sound intriguing!
I DO hope you will find a way to merge your functions with vim-taskwarrior AND vimwiki, it's a perfect fit!
No my implementation doesn't take over the vimwiki todo function. It only adds some functionality without modifying core vimwiki.
So yes, Vimwiki tasks and taskwarrior tasks can live side-by-side and you can choose which ones are 'shared' between TW and VW.
The way how I distinguish is by adding the UUID at the end of the task in Vimwiki, like this:
* [ ] think a bit more about this (2013-10-31 12:00) #f719f0b8-0021-4977-9213-e07b782d784b
The reason I don't use the task ID is because the ID can change, while the UUID will always be the same. I know that it looks a bit ugly, but vimwiki-tasks syntax-highlights the UUID as a comment so it doesn't stand out. I'm also going to have a look at the conceal functionality of Vim to hide the UUID.
For the moment tasks with a due date/time are always added into TW.
A task without a due date in VW won't get added to TW unless it ends in #TW (which will be replaced by the UUID after it is added in TW).
I also plan to add a :InsertTask <id> command to insert a task from TW into VW and similar :InsertTasks <filter> to insert multiple tasks.
FYI: I have put my initial code on Github; https://github.com/teranex/vimwiki-tasks
Feel free to play and give feedback :)
UPDATE: taskwarrior <--> vimwiki integration has been recently (and brilliantly) implemented in the form of TaskWiki (inspired by teranex's vimwiki-tasks)
I'm going to close this issue, but I'll be opening new ones under the heading "vim-taskwarrior <--> taskwiki integration" ;-)