PB IDE: "Save Snapshot" Menu entry

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 195
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

PB IDE: "Save Snapshot" Menu entry

Post by Tristano »

I have and editor which has a menu entry "Save Project Snapshot" which allows to save copies of the currently open project file, with the date timestamp added to it.

It opens the file-save dialog with the filename already set to "[project file name] - [year_month_day]-[2-digits counter]". So, if my project was "XYZ.proj", it would propose the default snapshot filename of "XYZ - 2016_06_23-01.proj", with the final 2-digits counter increasing in case other snapshots are present for today's date. But the user is free to change the proposed name to whatever he likes, overriding the default (at times I might want to skip the timestamp approach, and use intead numbered versioning like " - v1.0.1", etc).

This would be a handy feature in PB IDE, allowing to quickly save a backup copy of current source, without having to save it as something else, close it and reopen original file we were working on. Often during work one wishes to make a quick backup without having to resort to VCSs' like Git, etc.

Having access to it via Ctr + Shift + S would make it a one-click operation, and off you go with a safe copy of your source code last "all-working" point.

Possibly, not only for single files but for projects as well -- ie: applying the same file-renaming scheme to all project files at once, or maybe create an archive.

And if in Preferences one could chose between different file-naming conventions for snapshots (timestamp, like above example, or a versioning scheme, or user defined schemes through some patterns) it would be really great. And a choice to apply snapshots to all open files, or project files, or even to a specific list of files (including external in-folder resources, like images and other non-PB file types), so that Snapshot becomes a real snapshot of a WIP at a given point in time -- I guess for multiple files the best solution is creating a single archive, withrout renaming the files themselves, but the zipped container instead.

Not sure if I'm alone in desiring this, but I see it as a MAJOR missing feature, because I tend to make numbered copies of my code every time I reach a milestone -- but when working with multifile projects it becomes a bit of a pain, especially in Windows File Explorer. A one-click solution that could capture all my working files/project would really make my day smoother, and don't interrupt the creative flow.

Surely, it can be done via an external tool, and some users have come with their custom solutions, but still ... it's something I'd love to see implemented in PB's native IDE, especially since its IDE is already so good than one doesn't look for other IDEs to work with PB code.
The PureBASIC Archives: FOSS Resources: