vscode-markdown-checkbox icon indicating copy to clipboard operation
vscode-markdown-checkbox copied to clipboard

Add timestamp if checkbox is created

Open fujohnwang opened this issue 5 years ago • 4 comments

complete action has a timestamp, but there is no timestamp when the checkbox is created.

if a create tmestamp is there , I can roughly know how long the TODO item take.

I am not a JS developer, so if this feature can be done, that will be great ;)

fujohnwang avatar Nov 22 '19 07:11 fujohnwang

I have add the following code to local copy to solve this issue by myself, thanks.

(new Date().toISOString().split('T')[0])+"-> "

fujohnwang avatar Apr 24 '20 14:04 fujohnwang

image

fujohnwang avatar Apr 24 '20 14:04 fujohnwang

@fujohnwang thank you for letting me know that you've fixed the issue for yourself. Would you like to create a pull request with your changes? Then I could take a look and include it to this extension 🙂

I could also add an option which could enable/disable this feature through the user settings 👍

PKief avatar Apr 26 '20 17:04 PKief

@PKief sorry, I just modify the local source code under ~/.vscode, since I don't have enough skills on vscode extension dev, I have simply browsed the source and add date string under:

if(!r(s))e.edit(e=>{e.insert(new o.Position(s.lineNumber,a.pos),(t&&!a.bullet?n+" ":"")+"[ ] "+(new Date().toISOString().split('T')[0])+"-> ")})})

vscode-markdown-checkbox/src/createCheckbox.ts maybe.

I think, if you can provide config options for the date format and disable/enable, that will be great for all extension users ;0)

fujohnwang avatar Apr 27 '20 01:04 fujohnwang