Page 1 of 1

Is there autosave function in codelite ?

Posted: Thu Mar 14, 2013 11:57 am
by solewalker
Hi,
I am a new CodeLite user and I must say its one of the best cross-platform C/C++ IDE available. I was wondering if there is autosave function available in CodeLite , that would save my source files after a certain interval. I could not find anything about autosave so I posted it here. Sorry if I have posted this in the wrong section, I dont know where to post it.

Its not a major feature, I would still like CodeLite as much as I do now. And thanks for the awesome IDE :)

Re: Is there autosave function in codelite ?

Posted: Thu Mar 14, 2013 12:25 pm
by eranif
No, there is no such functionality in codelite.
If you could provide a brief description on the functionality you are looking for - we might implement it ;)

Eran

Re: Is there autosave function in codelite ?

Posted: Thu Mar 14, 2013 3:43 pm
by solewalker
Thanks for your reply. In least case, there is an interval after which all open files are saved or like automatically executing Ctrl+S for all opened files after a certain interval that user provides. Moreover, recent version of files can be backed up in case there is a crash or failure in CodeLite or in the system. Files can also be saved in a backup directory if user provides. CodeBlock has an autosave plugin but I have not used it so don't exactly know what it does.

It would also be better if we could execute certain command after a periodic interval, commands can be either a shortcut key, or combination of 2 or more shortcut keys.

Re: Is there autosave function in codelite ?

Posted: Thu Mar 14, 2013 7:20 pm
by petah
+1 on a vanilla autosave but a robust implementation may not be that trivial; it would have to coordinate across multiple CL instances so when a file is open in several places, the most recently-edited one is saved while older ones are auto-refreshed.

This happens often when working on a client/server project, with two CL instances open, common definitions in both workspaces and you're ping-ponging between CL instances while changing the protocol, say.

It's a fringe case otherwise but IMHO should still be handled correctly or "auto-save" could become "auto-shred" ;)

my 2 cents.

-- p

Re: Is there autosave function in codelite ?

Posted: Thu Mar 14, 2013 8:56 pm
by solewalker
oh, I have not thought about multiple instances, and I agree, it would be much useful if last changed files can be saved and synched in all instances.

I am favouring "autosave" because I use XCode in my workplace (for couple months though) and I dont have to manually save files there. So, when I am on windows at home, I usually forget to save files.

Not to mention, sometimes auto-completion does not work until the file is saved, so I have to press ctrl-S more often because of auto-completion feature. So "autosave" would also solve this kinda problem.

Re: Is there autosave function in codelite ?

Posted: Sun Mar 24, 2013 7:47 pm
by solewalker
To clarify how autosave function could work, I am giving an screenshot of autosave implementation from CodeBlocks.

Image

I don't know how it handles multiple instance, though they have 4 option but I am only interested in "Create Backup and save to original " and "Save to original file". Backup can be useful in many cases, in case of power failure or system crash I think.

Edit: sorry did not know how to upload image first, now its done

Re: Is there autosave function in codelite ?

Posted: Thu Apr 18, 2013 1:08 pm
by hekkeus
How about using an approach where the file is always kept in a saved state, like in Scribes or Scratch editors.

Scribes way:
- save after a couple of seconds of inactivity
- save when losing focus of the editor window
Scribes does not even have a save button. the autosave is always on and it takes care of all saving of documents.
Some more info in http://mystilleef.blogspot.fi/2009/11/s ... aving.html.

Scratch way:
- save after every change
Some more info in http://elementaryos.org/journal/scratch-11-out.

These both ways also handle multiple instances very well.