mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-20 01:03:06 +02:00
taskwiki: Add TaskWikiSort command
This commit is contained in:
parent
0b1705280b
commit
3641ac227e
2 changed files with 5 additions and 0 deletions
|
@ -59,6 +59,7 @@ command! -range TaskWikiDelete :<line1>,<line2>py SelectedTasks().delete()
|
|||
command! -range TaskWikiStart :<line1>,<line2>py SelectedTasks().start()
|
||||
command! -range TaskWikiStop :<line1>,<line2>py SelectedTasks().stop()
|
||||
command! -range TaskWikiDone :<line1>,<line2>py SelectedTasks().done()
|
||||
command! -range -nargs=* TaskWikiSort :<line1>,<line2>py SelectedTasks().sort(<q-args>)
|
||||
command! -range -nargs=* TaskWikiMod :<line1>,<line2>py SelectedTasks().modify(<q-args>)
|
||||
command! -range -nargs=* TaskWikiAnnotate :<line1>,<line2>py SelectedTasks().annotate(<q-args>)
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ def output_exception(exception_type, value, tb):
|
|||
sys.excepthook = output_exception
|
||||
|
||||
import cache
|
||||
import sort
|
||||
import util
|
||||
import viewport
|
||||
|
||||
|
@ -184,6 +185,9 @@ class SelectedTasks(object):
|
|||
vimwikitask.update_in_buffer()
|
||||
print("Task \"{0}\" stopped.".format(vimwikitask['description']))
|
||||
|
||||
def sort(self, sortstring):
|
||||
sort.TaskSorter(cache, self.tasks, sortstring).execute()
|
||||
|
||||
|
||||
class Mappings(object):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue