At the moment, the "backup on save" feature allows a fixed prefix/suffix string. But it would be nice if it allowed for contextually determined strings such as timestamps that would allow for automatic versioning of documents. The idea was proposed on reddit: https://www.reddit.com/r/kde/comments/aiywqi/is_it_possible_to_save_kate_backups_with/
Very sorry, this was meant to be a wish, not a bug. I can't see that I can change it though.
Thanks! I think it is a good wish :)
I already have a proof of concept patch for this here that supports %{hh}, %{mm}, %{ss}, and also YYYY, MM and DD. Since I have some other plans for such kind of macro expansion, this will wait a bit more.
Great! Looking forward to the patch!
Pending patch: https://phabricator.kde.org/D23832 which supports: - %{Date:Locale} - %{Date:ISO} - %{Date:<value>} - see https://doc.qt.io/qt-5/qdate.html#toString - %{Time:Locale} - %{Time:ISO} - %{Time:<value>} - see https://doc.qt.io/qt-5/qtime.html#toString - %{ENV:<value>} - %{JS:<expression>} - %{UUID}
Git commit a32b79d9394a72f19c4da5c210227472c8e00630 by Dominik Haumann. Committed on 11/09/2019 at 12:11. Pushed by dhaumann into branch 'master'. Backup on save: Support time and date string replacements Summary: Supported variables are: - %{Date:Locale} - %{Date:ISO} - %{Date:<value>} - see https://doc.qt.io/qt-5/qdate.html#toString - %{Time:Locale} - %{Time:ISO} - %{Time:<value>} - see https://doc.qt.io/qt-5/qtime.html#toString - %{ENV:<value>} - %{JS:<expression>} - %{UUID} Screenshot: {F7337486} FIXED-IN: 5.63 Reviewers: cullmann Reviewed By: cullmann Subscribers: ngraham, kwrite-devel, kde-frameworks-devel Tags: #kate, #frameworks Differential Revision: https://phabricator.kde.org/D23832 M +16 -0 src/dialogs/katedialogs.cpp M +11 -3 src/document/katedocument.cpp https://commits.kde.org/ktexteditor/a32b79d9394a72f19c4da5c210227472c8e00630