pyxel
pyxel copied to clipboard
Feature request: editor autosave
Autosave would be such a nice feature to not lose hours of work to not saving manually. Every 5 minutes would be excellent
Automatic backups could be nice, but not saving with the original filename — want to keep control on that!
Yes, I think it should be some sort of history, or saving on a pyxel-specific folder.
Just lost an hour of work over a dumb mistake. It's my fault, sure, but a simple auto backup can't hurt.
@kitao What is your opinion on this feature?
I don't like automatically created files (such as vim's .~ files) that are hard for novice users to understand, or blind use of configuration files. If there is a way to avoid that, I agree with the autosave function.
What if an auto saved history is saved inside of the resource file?
I do not agree with that because it enlarges the resource file size and also includes unnecessary data not intended by users.
Going back to the basics of UI design for the tool, I think it is necessary to sort out under what circumstances auto back up is needed in the first place.
It is important to first clarify the reason, such as whether it is because the user forgot to save and quit the application, or because the application is unstable and terminates abnormally, and then determine whether this is the case only for a limited number of users, and consider measures to prevent confusion for novice users.
Using Escape by default to quit without any save prompt is one big negative surprise.
I have a solution for the space, maybe saving the files in the user's data directory like AppData
on windows, or .local
on linux.
I think this is a measure that cannot have any negative effects of novice user confusion because you don't even need to make an UI to restore the files, only add an entry in the README, or add a --restore-latest CLI parameter.
Actually the reason why I added the quit shortcut by ESC key is just making debugging easier, so I disable it in the next release.
Could we still look into the original issue of auto saving? I think it would be really beneficial to new users. The space problem is negligible.
For cases where a recovery is prompted, we could check if the program crashed last run, or if the resource is empty and there is a backup (user closed, shut down, ctrl+c on the terminal, accidentally).