lpubsppop01 / vscode-auto-timestamp Goto Github PK
View Code? Open in Web Editor NEWA Visual Studio Code extension that update timestamp field when saving document.
License: zlib License
A Visual Studio Code extension that update timestamp field when saving document.
License: zlib License
Hi, when I change workspace settings, the extension is only looking at global settings. How can we update this?
I have a .red extension file with
Red [
Dates: [
// Created:
// Last modified:
]
]
It doesn't update on save.
Config:
"lpubsppop01.autoTimeStamp.momentFormat": "YYYY-MM-DD HH:mm:ssZZ",
"lpubsppop01.autoTimeStamp.modifiedTimeStart": "foobar: ",
File:
foobar: 2019-11-03 13:56:17+0100
Last modified: 2019-11-03 13:56:17+0100
-> save file:
foobar: 2019-11-03 13:56:17+0100
Last modified: 2019-11-03 13:58:20+0100
As you can see, the timestamps are out of sync after copy. Clearly, lpubsppop01.autoTimeStamp.modifiedTimeStart
is completely ignored and replaced with default
This extension does not work at all, but perhaps it's just because there is zero explanation or documentation on how to use it.
Using it in a C file in VSCode 1.34.0 on OSX 10.14.5 and try to embed time stamps, but nothing happens. First I tried thisβ¦
// Created:
// Last modified:
Then I tried
// Created: <created date and time>
// Last modified: <now date and time>
What am I missing?
Is there a setting that needs to be configured to use this Extension? When I save a document, nothing happens.
I expected this Extension to add the following fields to my doc on FIRST save:
//Created: <created date and time>
//Last Modified: <now date and time>
Then update the //Last Modified:
upon subsequent saves.
Can you assist me in understanding how to use the tool?
Thank you
Hello I am struggling to find out how to achieve the following comment:
/* Created: 09.10.2023 12:24:41 */
/* Last modified: 16.10.2023 10:02:34 */
Can you please guide me through the settings of Auto Time Stamp?
Kind regards
i notice that the timestamp was change every time i change the file content, and not yet save the file.
This behaviour affect the undo and redo history
How to disable timestamp changes upon change of file content, i only want to timestamp when i save the file
I love the extension....BUT more a suggestion than an issue.
In python and many other languages the // is not a comment, plus I need to use the date stamp in the code not just the comments.
So having the ability to edit all of the search string would be nice so that for instance I could have
script_mod_timestamp="2020-06-06 12:45:00"
.
.
.
print(script_mod_timestamp)
So the setting would be
lpubsppop01.autoTimeStamp.modifiedTimeStart = script_mod_timestamp="
lpubsppop01.autoTimeStamp.modifiedTimeEnd = "$
The requirement of having // on the line of code stops me from doing this in python
Trevor
Hello, I'd like to request adding an option that makes this extension insert timestamps in UTC time rather than local time. I'm thinking it could be lpubsppop01.autoTimeStamp.utc
, which defaults to false
, so that it's not a breaking change and can be opted in rather than be the default.
If you're open to the idea, I'd be willing to make a pull request to implement it. If not, I'd understand. Either way, thank you for the time you've spent creating and maintaining this extension.
What regex pattern can I use to allow this to happen ...
{{-- MODIFIED: [ 2022-04-20 02:51:45 PM ] --}}
{{-- some other comment --}}
instead of this ...
{{-- MODIFIED: [ 2022-04-20 02:51:45 PM ]
{{-- some other comment --}}
This is just what I was looking for ... but I cannot access the settings.
Hi @lpubsppop01,
I think it would be very useful if the extension allows us to specify the configuration by file type or by extension.
I mean something like what the Power Header extension allows to do.
For more information, see the examples at: Use Case Examples (extending default settings)
Below is an example of a segment of a settings.json
file as I imagine it could look like with the proposed modification:
"lpubsppop01.autoTimeStamp.fileNamePattern": "",
"[plaintext]": {
"lpubsppop01.autoTimeStamp.birthTimeEnd": "$",
"lpubsppop01.autoTimeStamp.birthTimeStart": "[cC]reated *: ",
"lpubsppop01.autoTimeStamp.lineLimit": "5",
"lpubsppop01.autoTimeStamp.modifiedTimeEnd": "$",
"lpubsppop01.autoTimeStamp.modifiedTimeStart": "[lL]ast[ -][mM]odified *: "
"lpubsppop01.autoTimeStamp.momentFormat": "DD/MM/YYYY HH:mm:ss",
}
"[md]": {
"lpubsppop01.autoTimeStamp.birthTimeEnd": " *-->",
"lpubsppop01.autoTimeStamp.birthTimeStart": "<!-- *[cC]reated: *: ",
"lpubsppop01.autoTimeStamp.lineLimit": "10",
"lpubsppop01.autoTimeStamp.modifiedTimeEnd": " *-->",
"lpubsppop01.autoTimeStamp.modifiedTimeStart": "<!-- *[lL]ast[ -][mM]odified *: "
"lpubsppop01.autoTimeStamp.momentFormat": "YYYY.MM.DD HH:mm:ss",
}
π Thank you for sharing this useful extension.
Kind regards,
Claudio Salvio
{"message":"Artifact not found or access denied."}
Does seem to not work anymore with VScode 1.70.1
If I right click on the extension and click "Extension Settings", VS code finds no settings, which uses the search @ext:lpubsppop01.vscode-auto-timestamp
. However, settings work fine by manually inputting them in the json as lpubsppop01.autoTimeStamp.momentFormat
for example. Is there something misconfigured in the package settings?
auto-timestamp: 0.0.4
vscode:
Version: 1.64.2
Commit: f80445acd5a3dadef24aa209168452a3d97cc326
Date: 2022-02-09T22:02:29.527Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.11.0-49-generic snap
Hello @lpubsppop01
It would appear that the plugin breaks single line block comments.
For example:
<!-- Last modified: -->
becomes:
<!-- Last modified: 2023/03/18 08:10:00:00
Could you fix it?
Best regards,
Claudio
PS: Thanks for the extension! π
If I open a file and save it, the timestamp gets updated. It should only do this if the buffer was modified and needed saving.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.