Forum > Editor

[Solved] AutoSave feature?

(1/2) > >>

lainz:
Hi, I've looked at the options first this time =)

But I can't find an autosave feature. I say like the one used by IntelliJ, so I never need to Ctrl + S again.

And if something bad happens, I always use Git, so there is no problem with that for me.

Any ideas / plugin / script to make this possible?

balazsszekely:
You can easily implement this feature:
1. Create a new package
2. Add IDEIntf to the required packages
3. Add IDECommands to the uses clauses
4. On IDE startup, start a timer, preferably a thread timer so you don't interfere with the IDE, when the timer ticks just call:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses IDECommands;  //...  IDECommands.ExecuteIDECommand(Self, ecSaveAll);  //.. 5. You can also create a dialog where the user can set the interval, or disable the feature, etc...

lainz:
Thanks, seems easy.

And sorry I'm new to that kind of plugins, there is a way to save all before closing Lazarus / closing Project?

balazsszekely:
AFAIK when you close the IDE, the changes are saved. The IDE even ask you: "Save changes to project xy?"

lainz:
Yes, I know that dialog.

What I wanted is like IntelliJ that saves it when you close with no prompt, and always it's saving. Like the Google Docs application, where there is no save button, everything is automatically saved.

Navigation

[0] Message Index

[#] Next page

Go to full version