_____ _ _ |_ _|_ _ ___| | ___ __ ___ __ _| | _____ _ __ | |/ _` / __| |/ / '_ ` _ \ / _` | |/ / _ \ '__| | | (_| \__ \ <| | | | | | (_| | < __/ | |_|\__,_|___/_|\_\_| |_| |_|\__,_|_|\_\___|_|
This nvim plugin can create Taskwarrior or todo.txt tasks from asciidoc or markdown checklists. I took the idea from the taskwiki, but my plugin doesn’t require additional dependencies and VimWiki. Taskmaker is smaller and restricted only to creating tasks from the selected text.
|
|
Markdown format and todo.txt are not well tested because I use a different setup. 🙃 |
-
Adding multiple tasks at once.
-
Group of the tasks can inherent tags and metadata.
-
Extra function for toggling tasks as done or undone.
-
Nested tasks.
-
Taskwarrior dependency, any child tasks being marked as dependencies of the parent tasks. (only taskwarrior)
-
URLs are automatically cut and added to the annotation. (only taskwarrior)
Select text and run TaskmakerAddTasks command. Tags from the title (the first line that starts with a dot followed by a character) will be added to each task. The task starts with a hyphen or an asterisk. Empty lines are omitted.
|
|
Prefixes (doesn’t apply to annotation) are only recognized on the title. For individual task you have to provide normal metadata.
|
.asciidoc format +context-name #project-name !L (priority low)
* [ ] task 1
** [ ] task 1.1
*** [ ] task 1.1.1
* [ ] task 2
.markdown format (indents have 2 spaces) +context-name #project-name !F (priority F)
- [ ] task 1
- [ ] task 1.1
- [ ] task 1.1.1
- [ ] task 2
.taskwarrior metadata example #project-name due:eom
* [ ] extra project tag project:projectB
* [ ] overrated due due:tomorrow
* [ ] task with an annotation ann: annotation's text
* [ ] auto detected url https://www.google.com the url will be added to the annotation
* [ ] task with priority priority:H
More examples are available in the test-cases.adoc file on the dev branch.
The configuration scheme is quite self-explanatory. If you use todo.txt, you have to change the app variable. For sync you have to set up synchronization in taskwarrior. The prefixes wait, due and annotation are available only for taskwarrior.
local config = {
app = 'taskwarrior', -- {'taskwarrior', 'todo.txt'}
feedback = false, -- confirmation message feedback
default_context = '', -- useful for the GTD inbox convention
sync = false, -- synchronization (only for taskwarrior)
spaces_number = 2, -- for markdown's nested checklist
prefix = {
project = '#',
context = '+',
priority = '!',
wait = 'wait:',
due = 'due:',
annotation = 'ann:',
},
}Taskmaker provides only two commands TaskmakerAddTasks and TaskmakerToggle.
vim.api.nvim_set_keymap('v','<LocalLeader>t', '<cmd>TaskmakerAddTasks <CR>')
vim.api.nvim_set_keymap('n','<LocalLeader>x', '<cmd>TaskmakerToggle <CR>')
-
❏ Known issue: Adding tasks from the first selection could not work. I’m not an expert in nvim, I just don’t know where the problem is.
-
❏ Range selection doesn’t work.
-
❏ Vim documentation.
