aserebryakov / vim-todo-lists

Vim plugin for TODO lists

Home Page:https://vim.sourceforge.io/scripts/script.php?script_id=5588

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatically add dates for new list items and these that are done

fronzek opened this issue · comments

I like the vim-todo-lists plugin. The way I started using it, I noticed that I always add dates when I add a new item and the date when I check an item to be completed. I would be nice to have these added automatically, e.g.:

  1. when a new item is added, add "{added on d1.m1.yyyy}" at the end of the new line
  2. when an item is checked to be done, add "{completed d2.m2.yyyy}" at the end of the line, or, if there is already "{added on " in that line, replace this with "{completed " and the last "}" with " to d2.m2.yyyy}" to read "{completed d1.m1.yyyy to d2.m2.yyyy}"

where d1.m1.yyyy and d2.m2.yyyy are the current dates, d1.m1. for a new line and d2.m2. for a task that is completed.

My use case isn't exactly the same as yours, but I did at least add a creation date to tasks with #17

Hope this helps!

Thanks, @jakemason , this is already getting close to my use case. I changed the date string from "%a %b, %Y" to "%d %b, %Y".