ecode icon indicating copy to clipboard operation
ecode copied to clipboard

Feature request: autosave functionality

Open orjanv opened this issue 10 months ago • 5 comments

Would be nice with autosave.

orjanv avatar Mar 29 '24 10:03 orjanv

Can you describe how exactly should behave? Any open-buffer with modifications should be retained? Any new file also should be restored even if the user never saves it? ecode is project oriented, how it should behave if you not open a project / folder and just a single file, should load all previously loaded files without a project? Thanks

SpartanJ avatar Mar 29 '24 15:03 SpartanJ

I realize that I cannot open an empty tab in the editor, it is only possible to open a new file, like touch and then it will not be a case of autosaving a buffer. Unsaved modifications on open files perhaps, but then again, I'm warned on unsaved upon exit:

image

I have used thonny and notepad++ where I can open a new tab without assigning it to a filename, just an unsaved note, which n++ would keep if closed. This last part was in my mind i guess.

orjanv avatar Mar 29 '24 17:03 orjanv

Actually, I could open a new tab cith ctrl+t

image

orjanv avatar Mar 29 '24 17:03 orjanv

 I have used thonny and notepad++ where I can open a new tab without assigning it to a filename, just an unsaved note, which n++ would keep if closed. This last part was in my mind i guess.

Perfect. Yes, currently ecode will just alert the user that the document will be lost of not saved. Notepad++ doesn't have projects / folders so we would need to have a different behaviour. I think that what it makes more sense is: keep unsaved files from "non-project" files open on non-project context and keep unsaved files from each open project separately. So if you open a project and last time was closed with unsaved files they'll be restored, and if you open ecode without any open folder it will restore the files from that previous context.

SpartanJ avatar Apr 01 '24 18:04 SpartanJ

@orjanv Is what you are asking for similar to the autosave plugin of Lite XL and Pragtical?

ghost avatar Apr 02 '24 06:04 ghost

Done, this is called "Session Snapshot & Periodic Backup" in Notepad++, I've used the same name since it makes more sense, auto-save is a different thing.

SpartanJ avatar Jul 16 '24 19:07 SpartanJ