-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathtaskwarrior.vim
More file actions
111 lines (108 loc) · 5.54 KB
/
Copy pathtaskwarrior.vim
File metadata and controls
111 lines (108 loc) · 5.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
if exists('g:loaded_taskwarrior') && g:loaded_taskwarrior
finish
endif
if !executable('task')
echoerr "This plugin depends on taskwarrior(https://taskwarrior.org)."
finish
endif
let g:task_report_command = get(g:, 'task_report_command', [])
let s:task_report_command = ['active', 'all', 'blocked', 'blocking', 'completed', 'list', 'long', 'ls', 'minimal', 'newest', 'next', 'oldest', 'overdue', 'ready', 'recurring', 'unblocked', 'waiting']
let g:task_report_command = extend(s:task_report_command, g:task_report_command)
let g:task_interactive_command = ['annotate', 'denotate', 'execute', 'duplicate',
\ 'append', 'prepend', 'stop', 'delete', 'done', 'undo',
\ 'config', 'edit', 'start', 'sync', 'synchronize', 'add',
\ 'modify', 'import', 'colors', 'color', 'logo', 'context']
let g:task_filter = ['description:', 'proj:', 'pri:', 'status:', 'tag:', 'due.before:', 'due.after:', 'entry.before', 'entry.after', 'end.before', 'end.after', '+']
let g:task_all_commands = split(system('task _command'), '\n')
let g:task_all_configurations = split(system('task _config'), '\n')
let g:task_report_name = index(g:task_report_command, get(g:, 'task_report_name')) != -1 ? get(g:, 'task_report_name') : 'next'
let g:task_highlight_field = get(g:, 'task_highlight_field', 1)
let g:task_readonly = get(g:, 'task_readonly', 0)
let g:task_rc_override = get(g:, 'task_rc_override', '')
let g:task_default_prompt = get(g:, 'task_default_prompt', ['due', 'project', 'priority', 'description', 'tag', 'depends'])
let g:task_info_vsplit = get(g:, 'task_info_vsplit', 0)
let g:task_info_size = get(g:, 'task_info_size', g:task_info_vsplit? 50 : 15)
let g:task_info_position = get(g:, 'task_info_position', 'belowright')
" let g:task_log_directory = get(g:, 'task_log_file', system('task _get -- rc.data.location')[0:-2])
let g:task_log_directory = get(g:, 'task_log_file', matchstr(system('task show | grep data.location')[0:-2], '\S*$'))
let g:task_log_max = get(g:, 'task_log_max', 10)
let g:task_left_arrow = get(g:, 'task_left_arrow', ' <<')
let g:task_right_arrow = get(g:, 'task_right_arrow', '>> ')
let g:task_readonly_symbol = get(g:, 'task_readonly_symbol', ' ')
let g:task_gui_term = get(g:, 'task_gui_term', 1)
let g:task_disable_mappings = get(g:, 'task_disable_mappings', 0)
let g:task_columns_format = {
\ 'depends': ['list', 'count', 'indicator'],
\ 'description': ['combined', 'desc', 'oneline', 'truncated', 'count'],
\ 'due': ['formatted', 'julian', 'epoch', 'iso', 'age', 'countdown'],
\ 'end': ['formatted', 'julian', 'epoch', 'iso', 'age', 'countdown'],
\ 'entry': ['formatted', 'julian', 'epoch', 'iso', 'age', 'countdown'],
\ 'id': ['number'],
\ 'imask': ['number'],
\ 'mask': ['default'],
\ 'modified': ['formatted', 'julian', 'epoch', 'iso', 'age', 'countdown'],
\ 'parent': ['long', 'short'],
\ 'priority': ['short', 'long'],
\ 'project': ['full', 'parent', 'indented'],
\ 'recur': ['duration', 'indicator'],
\ 'scheduled': ['formatted', 'julian', 'epoch', 'iso', 'age', 'countdown'],
\ 'start': ['formatted', 'julian', 'epoch', 'iso', 'age', 'countdown', 'active'],
\ 'status': ['long', 'short'],
\ 'tags': ['list', 'indicator', 'count'],
\ 'until': ['formatted', 'julian', 'epoch', 'iso', 'age', 'countdown'],
\ 'urgency': ['real', 'integer'],
\ 'uuid': ['long', 'short'],
\ 'wait': ['formatted', 'julian', 'epoch', 'iso', 'age', 'countdown'] }
"
"commented out pending taskd collision avoidance
"command! TaskPush call tw#remote('push')
"command! TaskPull call tw#remote('pull')
"command! TaskMerge call tw#remote('merge')
"
"commands;
"
command! -nargs=? -complete=customlist,taskwarrior#complete#TW TW :call taskwarrior#init(<q-args>)
command! -nargs=? TWReportInfo :call taskwarrior#action#show_info(<q-args>)
"command! TWConfigColor
command! TWDeleteCompleted :call taskwarrior#action#clear_completed()
"command! TWDeleteNote
"command! TWEdit
"command! TWEditAnnotation
"command! TWEditDescription
command! TWEditTaskrc :execute "e ".$HOME."/.taskrc"
command! TWEditVitrc :execute "e ".$HOME."/.vitrc"
command! TWEditTaskopenrc :execute "e ".$HOME."/.taskopenrc"
"command! TWExport
"command! TWHelp
command! TWHistory :Unite task/history
command! TWHistoryClear :call taskwarrior#log#history('clear')
command! TWBookmark :Unite task/bookmark
command! TWBookmarkClear :call taskwarrior#log#bookmark('clear')
"command! TWInsert
"command! TWImport
"command! TWNote
"command! TWOpen
"command! TWOpenInline
"command! TWReport
"command! TWReportAgenda
"command! TWReportBreak
"command! TWReportCalendar
"command! TWReportDesc
"command! TWReportEdit
"command! TWReportGantt
"command! TWReportProjects
"command! TWReportTags
"command! TWSyncFiles
"command! TWSyncStatus
"command! TWTheme
"command! TWThemeEdit
"command! TWThemeShow
command! TWUndo :call taskwarrior#action#undo()
"command! TWWiki
"command! TWWikiDiary
"command! TWWikiDiaryAdd
"command! TWWikiGenIndex
"command! TWWikiGenProject
"command! TWWikiGenTag
"command! TWWikiIndex
let g:loaded_taskwarrior = 1