visual-studio-codevscode-snippets

Looking for a VS Code snippet that automatically inserts a modification date value upon saving


Well, that's the idea, to find a VS Code snippet/extension that automatically inserts a customizable timestamp where indicated by a placeholder or something, so you could forget (as indeed I do most of the times and hence my search 🙄) about having to manually update something like that.

I normally use something like local build = "20031005-1803" as part of versioning my Lua scripts and I know about the existence of this kind of snippets: Insert Date String for inserting datetime manually, but I'm unable to find one that automates the process like described (assuming it's possible)


Solution

  • You can use https://marketplace.visualstudio.com/items?itemName=lpubsppop01.vscode-auto-timestamp#:~:text=Update%20timestamp%20in,Install that seems to do exactly this. It tracks create time and update time of file on save.

    enter image description here