taskwiki: Add history related commands

This commit is contained in:
Tomas Babej 2015-03-22 19:42:40 +01:00
parent 1788ae1987
commit a789954206
2 changed files with 17 additions and 0 deletions

View file

@ -7,6 +7,7 @@ augroup taskwiki
execute "autocmd BufWrite *.".expand('%:e')." py WholeBuffer.update_to_tw()"
augroup END
" Split reports commands
command! -nargs=* TaskWikiProjects :py SplitProjects(<q-args>).execute()
command! -nargs=* TaskWikiProjectsSummary :py SplitSummary(<q-args>).execute()
command! -nargs=* TaskWikiBurndownDaily :py SplitBurndownDaily(<q-args>).execute()
@ -15,7 +16,10 @@ command! -nargs=* TaskWikiBurndownWeekly :py SplitBurndownWeekly(<q-args>).execu
command! -nargs=* TaskWikiCalendar :py SplitCalendar(<q-args>).execute()
command! -nargs=* TaskWikiGhistoryAnnual :py SplitGhistoryAnnual(<q-args>).execute()
command! -nargs=* TaskWikiGhistoryMonthly :py SplitGhistoryMonthly(<q-args>).execute()
command! -nargs=* TaskWikiHistoryAnnual :py SplitGhistoryAnnual(<q-args>).execute()
command! -nargs=* TaskWikiHistoryMonthly :py SplitGhistoryMonthly(<q-args>).execute()
" Commands that operate on tasks in the buffer
command! -range TaskWikiInfo :<line1>,<line2>py SelectedTasks().info()
command! -range TaskWikiLink :<line1>,<line2>py SelectedTasks().link()
command! -range TaskWikiDelete :<line1>,<line2>py SelectedTasks().delete()

View file

@ -217,16 +217,29 @@ class SplitCalendar(Split):
self.tw_extra_args = util.tw_modstring_to_args(args)
self.split_name = self.split_name or self.command
class SplitGhistoryMonthly(Split):
command = 'ghistory.monthly'
colorful = True
maxwidth = True
class SplitGhistoryAnnual(Split):
command = 'ghistory.annual'
colorful = True
maxwidth = True
class SplitHistoryMonthly(Split):
command = 'history.monthly'
colorful = True
vertical = True
class SplitHistoryAnnual(Split):
command = 'history.annual'
colorful = True
vertical = True
if __name__ == '__main__':
WholeBuffer.update_from_tw()