blindFS / vim-taskwarrior

vim interface for taskwarrior
Other
518 stars 42 forks source link

:TWReportInfo, invoked with no ID(s), uses uuid on current row #108

Open linuxcaffe opened 9 years ago

linuxcaffe commented 9 years ago

When :TWReportInfo ID(s) is invoked while editing a file in vim, it opens the related info reports, as expected. When running it without parameters, (ID(s)) :TWReportInfo (on my system) seems to open an info report for ALL tasks!! That makes sense, but not useful! What should happen? The TWReportInfo should, if no parameters given, look to the current row for a uuid, and if one is found, should run the info report on that uuid.

This would be a very useful feature, because several processes will log a uuid (as metadata) to a text file, in a taskwiki or like this example timelog;

i 2015/02/24 12:04:44 contact:tech  call Hugh Reily
o 2015/02/24 12:04:55  ; uuid: 07bef5e9-97cc-4007-a0fd-f2849f9f9ced

i 2015/02/24 13:42:38 no project  contact Fred Knudsen
o 2015/02/24 13:45:08  ; :next:Barb:StP: uuid: cbba7d49-595a-46f8-8808-c0566ca84eb0

i 2015/02/24 13:45:29 no project  call Fast Eddy
o 2015/02/24 13:46:02  ; uuid: 0068320e-56b9-4cbf-a29c-e7b9e5c6efb6

If TWReportInfo (no params) were invoked, with the cursor on the same line as a uuid, and displaying the info report for that task, that would provide an excellent "back-link" from within any taskwarrior-related log file.

blindFS commented 9 years ago

If you have a taskreport buffer opened, you can use the enter key to view info instead of that command. And it will react just as what you want. Basically, that command is for using outside the report buffer.

linuxcaffe commented 9 years ago

That sure seems to be how it works in a task-report buffer, but I'm still not seeing that behavior in a non-task-report buffer. As an example, if working on a timelog file, like the example snippet above, and invoke TWReportInfo, the info buffer opens up, but I can't see any relation to the timelog buffer. Another difference is that the info-buffer opens with the cursor in the info-buffer (unlike when used with a task-report-buffer) hitting < enter > will close the info-buffer, and moving the cursor up to the top window (timelog-buffer) hitting < enter > only moves the cursor down one line, does not seem to affect the info-buffer.. what am I doing wrong?

To re-iterate, what I'm hoping to end up with, is invoke :TWReportInfo, the bottom window opens up with an info report based on the uuid found in the current row.. If it were possible to leave the info window open, move the cursor to another uuid row in the timelog-buffer and hit < enter > to refresh the info-buffer, that would be a bonus.