Genio
Genio copied to clipboard
Auto save regular after a short delay
As a developer, every change I make, I make it with a purpose. Code -> Test,make -> Code. Currently I have a terminal open to run make regular. Or I click the male button. But this requires that the file is saved.
Also, if at some point in future clang-tidy or clan-check runs, the file needs to be saved anyway.
Currently I need to save manually very often.
The worry, to save an unwanted change can be eliminated by using git.
What files should be saved?
- all the ones related to the open project(s)?
- all the ones related to the active project?
- all the opened files even if unrelated to a project?
(I vote for option 1)
What about if the project is not under git?
I have some reservations about such feature. It may lead to unintentional changes hard to track, especially on files that are not under source control or are not source files (e.g. readme, release notes, etc.).However, If implemented it should be optional but it should occur for all opened files regardless where they belong to, for consistency reasons.Il giorno 9 feb 2023, alle ore 09:27, Freaxed @.***> ha scritto: What files should be saved?
all the ones related to the open project(s)? all the ones related to the active project? all the opened files even if unrelated to a project?
(I vote for option 1) What about if the project is not under git?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
After I have given it some thought, I think that an unconditionally auto-save can only new an opt-in by a user configuration.
More useful would be an auto-save not time-based, but task based. So let any edited file save on:
- tab close
- project close
- build start
- run start
- any git actions (if any in this IDE)
- Focus change of the app (app switch?)
That ensures, that a change will be in affect for a new task, let's say: make some actions in a terminal, run git, start a build etc.
Mostly agree but this would require a significant change in the architecture which is not much event-driven at the moment. We would need an easier way to implement delegation and Haiku API is not designed with that in mind. We may use a pub/sub pattern by broadcasting messages but every component of the application should be message-aware. Let's see how it goes. As of now, I would start with (considering) prompting the user to save any opened files which belong to the project being built or run. To do that we need to implement a two-way connection between the files opened in the editor and the Project. This does not exist, as of yet.
As a side note, I'm thinking of delegating this to a third-party add-on or script if we manage to implement a pluggable architecture.
As a developer, every change I make, I make it with a purpose. Code -> Test,make -> Code. Currently I have a terminal open to run make regular. Or I click the male button. But this requires that the file is saved.
Also, if at some point in future clang-tidy or clan-check runs, the file needs to be saved anyway.
Currently I need to save manually very often.
We have implemented save on build and build on save. I think one of these options could improve your workflow.
How it's done in Eclipse: