Repository navigation
Expand file tree
/
Copy pathREADME
More file actions
169 lines (129 loc) · 6.81 KB
/
Copy pathREADME
File metadata and controls
169 lines (129 loc) · 6.81 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
This plugin provides the |:Ttodo| command that allow easy editing,
viewing, and filtering of todo.txt files (see http://todotxt.com) via
|tlib#input#List()|. The plugin supports:
- syntax highlighting for todo.txt files
- search across multiple todo.txt files (see |:Ttodo|)
- filter tasks with specific tags, lists etc. (see |:Ttodo|)
- subtasks (outlines of complex tasks)
- hide tasks until a threshold date
- recurring tasks.
Examples: >
" Show all tasks; default map (|g:ttodo_nmap|): <Leader>1
:Ttodo
" Show important tasks; default map (|g:ttodo_nmap_important|): <Leader>!
:Ttodo!
" Show tasks that are due in the next two weeks
:Ttodo --due=2w
" Show tasks with priorities A to C
:Ttodo --pri=A-C
" Show tasks matching @Test
:Ttodo @Test
" By default, |:Ttodo| scans the todo.txt files in |g:ttodo#dirs|. Users
" can also scan loaded buffers.
" Show tasks in the current buffer
:Ttodo --bufname=%
" Command-line options can be collected in preference sets (see
" |g:ttodo#prefs|)
:Ttodo --pref=work
Global maps:
<Leader>1 ............ Show tasks (:Ttodo)
<Leader>! ............ Show important tasks (:Ttodo --pref=important)
If filetype is ttodo, the following buffer-local keymaps are enabled:
<cr> ................. Add a new task;
if |g:ttodo#ftplugin#add_at_eof| is true, add the
task at the end of file
<c-cr> ............... Add a new task; copy any list, tags, and notes from
the current task;
if |g:ttodo#ftplugin#add_at_eof| is true, add the
task at the end of file
<s-cr> ............... Add a new subtask
<LocalLeader>tx ...... Mark the current task as "done"
<LocalLeader>td ...... Mark the current task as due in N days
<LocalLeader>tw ...... Mark the current task as due in N weeks
<LocalLeader>tm ...... Mark the current task as due in N months
<LocalLeader>ty ...... Set the current task's priority
<LocalLeader>ta ...... Archive completed tasks
<LocalLeader>tb ...... View, filter tasks in the current buffer
<LocalLeader>t* ...... View tasks in the current buffer that match the word
under the cursor
<LocalLeader>tn ...... Add a note (the filename uses the first @list tag)
<LocalLeader>ti ...... Add a hopefully unique ID (an Adler32 hash)
<LocalLeader>tD ...... Add a dependency
If filetype is ttodo, the following buffer-local commands are enabled:
|:Ttodoarchive| ...... Archive completed tasks in the current buffer
|:Ttodobuffer| ....... Show tasks in the current buffer only
|:Ttodonote| ......... Add a new note to the task at the cursor
|:Ttodosort| ......... Sort the tasks in the current buffer
As a ftplugin, ttodo supports the following syntax/extensions to todo.txt (see
also https://github.com/ginatrapani/todo.txt-cli/wiki/The-Todo.txt-Format):
(A) DATE TASK ........ A priority as upper case letter (at the beginning of the
line)
DATE TASK ............ An open task
x DATE DATE TASK ..... A completed task (with completion date)
indented tasks ..... A indented task is a subtask of the parent task; unless
`has_subtasks` is true, |:Ttodo| will only show tasks
with no open subtasks; this is similar to how the
outline addon handles subtasks (see also
https://github.com/samuelsnyder/outline-todo.txt)
*ttodo-tags*
A TASK may contain the following tags:
*ttodo-@next*
@list ............ a "list" tag
NOTE: The is a special list `@next` that marks important
task that should really be tackled next.
+keyword ......... a "keyword" tag
h:1 .............. hidden task
due:YYYY-MM-DD ... due dates
NOTE: If a task is member of the `@next` list, filters
by due dates will be ignored
rec:+Nx .......... When marking a task a "done", add a new task with a due
date in N d(ays), w(eeks), m(onths), y(ears); with the
leading '+' use the original due date; else use the
completion date; this is similar to how the Simpletask
Android app handles `rec` tags
t:YYYY-MM-DD ..... Hide the tasks until the given date
t:-Nd ............ Hide the tasks until N days before the due date
id:ID ............ Define a tasks ID string (an ID should consist
of alphanumeric characters only)
dep:IDs .......... Depends on task with ID (if the other task is not
completed yet, mark the current task as pending);
IDs is a comma-separated list of IDs
parent:ID ........ In outlines: the current task is the child of
task with ID
*ttodo-file-options*
$TTODO$ OPTION:VALUE .. If a line matches `$TTODO$` it is assumed to
contain a file-local option. Search the help file for
`OPTION:` to see which options are available. Users will
typically want to hide such lines using `h:1`
If you set |g:ttodo_enable_ftdetect| to 0, you can use the |:Ttodo| command in
conjunction with other syntax files/ftplugins such as:
- https://github.com/freitass/todo.txt-vim
- todo-txt.vim : Vim plugin for Todo.txt
https://github.com/dbeniamine/todo.txt-vim or
http://www.vim.org/scripts/script.php?script_id=5134
- https://github.com/mivok/vimtodo or
http://www.vim.org/scripts/script.php?script_id=3264
- https://github.com/davidoc/todo.txt-vim
- My fork: https://github.com/tomtom/todo.txt-vim-1
- https://github.com/dsiroky/vim-todotxt
- ...
Related work:
- https://github.com/elentok/todo.vim
-----------------------------------------------------------------------
Install~
To install the vimball, edit the vba file and type: >
:so %
See :help vimball for details.
To install from github, please use
1. git + a plugin loader like enable_vim, pathogen, vim-unbundle etc.
2. a plugin manager like VAM, Vundle, NeoBundle, vim-plug etc.
The tlib_vim plugin is required:
https://github.com/tomtom/tlib_vim
Optional enhancement:
- https://github.com/tomtom/autolinker_vim for hyperlinking
Also available via git: http://github.com/tomtom/ttodo_vim
Setup~
Please set |g:ttodo#dirs| in |vimrc| before using |:Ttodo|.
Dependencies:
tlib (>= 1.26) :: http://github.com/tomtom/tlib_vim
License: GPLv3 or later