diff --git a/ftplugin/vimwiki/taskwiki.vim b/ftplugin/vimwiki/taskwiki.vim index 5aedd17..e9f9d52 100644 --- a/ftplugin/vimwiki/taskwiki.vim +++ b/ftplugin/vimwiki/taskwiki.vim @@ -41,44 +41,44 @@ augroup taskwiki augroup END " Global update commands -execute "command! -nargs=* TaskWikiBufferSave :" . g:taskwiki_py . "WholeBuffer.update_to_tw()" -execute "command! -nargs=* TaskWikiBufferLoad :" . g:taskwiki_py . "WholeBuffer.update_from_tw()" +execute "command! -buffer -nargs=* TaskWikiBufferSave :" . g:taskwiki_py . "WholeBuffer.update_to_tw()" +execute "command! -buffer -nargs=* TaskWikiBufferLoad :" . g:taskwiki_py . "WholeBuffer.update_from_tw()" " Split reports commands -execute "command! -nargs=* TaskWikiProjects :" . g:taskwiki_py . "SplitProjects().execute()" -execute "command! -nargs=* TaskWikiProjectsSummary :" . g:taskwiki_py . "SplitSummary().execute()" -execute "command! -nargs=* TaskWikiBurndownDaily :" . g:taskwiki_py . "SplitBurndownDaily().execute()" -execute "command! -nargs=* TaskWikiBurndownMonthly :" . g:taskwiki_py . "SplitBurndownMonthly().execute()" -execute "command! -nargs=* TaskWikiBurndownWeekly :" . g:taskwiki_py . "SplitBurndownWeekly().execute()" -execute "command! -nargs=* TaskWikiCalendar :" . g:taskwiki_py . "SplitCalendar().execute()" -execute "command! -nargs=* TaskWikiGhistoryAnnual :" . g:taskwiki_py . "SplitGhistoryAnnual().execute()" -execute "command! -nargs=* TaskWikiGhistoryMonthly :" . g:taskwiki_py . "SplitGhistoryMonthly().execute()" -execute "command! -nargs=* TaskWikiHistoryAnnual :" . g:taskwiki_py . "SplitHistoryAnnual().execute()" -execute "command! -nargs=* TaskWikiHistoryMonthly :" . g:taskwiki_py . "SplitHistoryMonthly().execute()" -execute "command! -nargs=* TaskWikiStats :" . g:taskwiki_py . "SplitStats().execute()" -execute "command! -nargs=* TaskWikiTags :" . g:taskwiki_py . "SplitTags().execute()" +execute "command! -buffer -nargs=* TaskWikiProjects :" . g:taskwiki_py . "SplitProjects().execute()" +execute "command! -buffer -nargs=* TaskWikiProjectsSummary :" . g:taskwiki_py . "SplitSummary().execute()" +execute "command! -buffer -nargs=* TaskWikiBurndownDaily :" . g:taskwiki_py . "SplitBurndownDaily().execute()" +execute "command! -buffer -nargs=* TaskWikiBurndownMonthly :" . g:taskwiki_py . "SplitBurndownMonthly().execute()" +execute "command! -buffer -nargs=* TaskWikiBurndownWeekly :" . g:taskwiki_py . "SplitBurndownWeekly().execute()" +execute "command! -buffer -nargs=* TaskWikiCalendar :" . g:taskwiki_py . "SplitCalendar().execute()" +execute "command! -buffer -nargs=* TaskWikiGhistoryAnnual :" . g:taskwiki_py . "SplitGhistoryAnnual().execute()" +execute "command! -buffer -nargs=* TaskWikiGhistoryMonthly :" . g:taskwiki_py . "SplitGhistoryMonthly().execute()" +execute "command! -buffer -nargs=* TaskWikiHistoryAnnual :" . g:taskwiki_py . "SplitHistoryAnnual().execute()" +execute "command! -buffer -nargs=* TaskWikiHistoryMonthly :" . g:taskwiki_py . "SplitHistoryMonthly().execute()" +execute "command! -buffer -nargs=* TaskWikiStats :" . g:taskwiki_py . "SplitStats().execute()" +execute "command! -buffer -nargs=* TaskWikiTags :" . g:taskwiki_py . "SplitTags().execute()" " Commands that operate on tasks in the buffer -execute "command! -range TaskWikiInfo :," . g:taskwiki_py . "SelectedTasks().info()" -execute "command! -range TaskWikiEdit :," . g:taskwiki_py . "SelectedTasks().edit()" -execute "command! -range TaskWikiLink :," . g:taskwiki_py . "SelectedTasks().link()" -execute "command! -range TaskWikiGrid :," . g:taskwiki_py . "SelectedTasks().grid()" -execute "command! -range TaskWikiDelete :," . g:taskwiki_py . "SelectedTasks().delete()" -execute "command! -range TaskWikiStart :," . g:taskwiki_py . "SelectedTasks().start()" -execute "command! -range TaskWikiStop :," . g:taskwiki_py . "SelectedTasks().stop()" -execute "command! -range TaskWikiDone :," . g:taskwiki_py . "SelectedTasks().done()" -execute "command! -range TaskWikiRedo :," . g:taskwiki_py . "SelectedTasks().redo()" +execute "command! -buffer -range TaskWikiInfo :," . g:taskwiki_py . "SelectedTasks().info()" +execute "command! -buffer -range TaskWikiEdit :," . g:taskwiki_py . "SelectedTasks().edit()" +execute "command! -buffer -range TaskWikiLink :," . g:taskwiki_py . "SelectedTasks().link()" +execute "command! -buffer -range TaskWikiGrid :," . g:taskwiki_py . "SelectedTasks().grid()" +execute "command! -buffer -range TaskWikiDelete :," . g:taskwiki_py . "SelectedTasks().delete()" +execute "command! -buffer -range TaskWikiStart :," . g:taskwiki_py . "SelectedTasks().start()" +execute "command! -buffer -range TaskWikiStop :," . g:taskwiki_py . "SelectedTasks().stop()" +execute "command! -buffer -range TaskWikiDone :," . g:taskwiki_py . "SelectedTasks().done()" +execute "command! -buffer -range TaskWikiRedo :," . g:taskwiki_py . "SelectedTasks().redo()" -execute "command! -range -nargs=* TaskWikiSort :," . g:taskwiki_py . "SelectedTasks().sort()" -execute "command! -range -nargs=* TaskWikiMod :," . g:taskwiki_py . "SelectedTasks().modify()" -execute "command! -range -nargs=* TaskWikiAnnotate :," . g:taskwiki_py . "SelectedTasks().annotate()" +execute "command! -buffer -range -nargs=* TaskWikiSort :," . g:taskwiki_py . "SelectedTasks().sort()" +execute "command! -buffer -range -nargs=* TaskWikiMod :," . g:taskwiki_py . "SelectedTasks().modify()" +execute "command! -buffer -range -nargs=* TaskWikiAnnotate :," . g:taskwiki_py . "SelectedTasks().annotate()" " Interactive commands -execute "command! -range TaskWikiChooseProject :," . g:taskwiki_py . "ChooseSplitProjects('global').execute()" -execute "command! -range TaskWikiChooseTag :," . g:taskwiki_py . "ChooseSplitTags('global').execute()" +execute "command! -buffer -range TaskWikiChooseProject :," . g:taskwiki_py . "ChooseSplitProjects('global').execute()" +execute "command! -buffer -range TaskWikiChooseTag :," . g:taskwiki_py . "ChooseSplitTags('global').execute()" " Meta commands -execute "command! TaskWikiInspect :" . g:taskwiki_py . "Meta().inspect_viewport()" +execute "command! -buffer TaskWikiInspect :" . g:taskwiki_py . "Meta().inspect_viewport()" " Disable as VimwikiFollowLink if !hasmapto('VimwikiFollowLink') diff --git a/tests/test_splits.py b/tests/test_splits.py index 5d55a95..13750b2 100644 --- a/tests/test_splits.py +++ b/tests/test_splits.py @@ -277,6 +277,9 @@ class TestSplitReplacement(IntegrationTest): assert self.py("print(vim.current.buffer)", silent=False).startswith("p") + self.command("TaskWikiBurndownDaily") assert self.py("print(vim.current.buffer)", silent=False).startswith("