Problem: I have personal PhD projects on GitHub that are solely for me (i.e. no pull/branches) and I have been trying to create a keyboard binding (or via any means) that can autofill the current date and time. It would look more professional then my current method of just using t
or whatever key so I can see when browsing the repository when things were updated without consulting the history. I would like a key that could do this please:
What I have tried: I have found an answer by @ianyongli to How to insert current date time in vscode? that I have adapted like so:
{
"key": "ctrl+.",
"command": "git.commit",
"args": {
"snippet": "$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND"
}
},
However, this brings up the "please provide a message for Git" and does not work (as it naturally just commits). git.commit
had no further options and git.
itself had many options I did not understand like git.commitMessageAccept
which does not work. The linked answer works in text and I can copy and paste it into the box but wouldn't mind an automatic way.
What am I missing please?
It would be nice but not essential if it committed and pushed at the same time, like I mentioned earlier this is not for professional purposes. I am familiar with programming but not VS code intricacies. I searched on this site for questions concerning inserting text into that message box but couldn't even find what the message box is called internally hence this question.