-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion for linking tasks to a vimwiki page #217
Comments
I came here to create an issue in a similar vein. Although what I was going to suggest was a command that would essential grep the vimwiki's looking for the id for the task under the cursor. Doing that would allow me to jump to the note, get context, and maybe complete it. Afterwards I would jump back to potentially the viewport that contained it and refresh to see the new state. |
I have created #270 that does exactly this. |
I've been using https://github.com/mikebobroski/tasknote/blob/master/tasknote for associating a text file of notes for a given task.... and dreaming of the day when I'd have a vim keybinding to jump from the taskwiki task item to the text file for that task. I'm very excited to check out @nkakouros's #270 :) |
@ahillio it ended up being a very easy function to write in vimscript. Here is how I did it https://github.com/skbolton/titan/blob/683db8d88b13bc9d8bfe010a13017798650824ac/nvim/nvim/plugin/wiki.vim#L37 |
Oh sweet! Do you know how to get the full task id from a vimscript function like that? My tasknote files are named like |
Currently my attempt looks like:
and obviously the |
In the case of using tasknote script to associate a
If the file doesn't exist it will be created. In which case this function is a little incomplete as it should then add a [tasknote] annotation to the task. |
@ahillio if you want the full uuid I would do this.
for example this is how you can get a task uuid in taskwarrior task _get "7c71b13d".uuid
7c71b13d-bee0-491e-9377-b0409f701341 |
thanks @skbolton, that's cleaner :) |
This should also work and could be more robust as it uses taskwiki/tasklib to get the uuid:
|
this is exactly what I needed! "adding notes to tasks:
"TODO: should automatically make the notes directory
function TaskSearch()
let task_id = py3eval("SelectedTasks().tasks[0].task['uuid']")
exe printf("e ~/.task/notes/%s.md", task_id)
endfunction
command! TaskSearch :call TaskSearch()
nnoremap <leader>tn :TaskSearch <Enter> someday #270 will be finished and be a more legitimate version of this :) |
Wish I were better at vimscript so I could do more than throw peanuts from the peanut gallery. But it would be great if a task could link to a vimwiki page dedicated to the task for notes and discussion around the task. You could use the task id for the name of the page. I know you can annotate a note with the name of the file the task is on but that isn't much help.
The text was updated successfully, but these errors were encountered: