How create autosave in komodo editor

I don’t talk about the auto-backup but the real autosave that just saves your files progressively when your write new code.

This feature doesn’t exist but you could easily write a user script that saves your file periodically. The follow code will save your file ever 5 seconds after your last key press.

var _ = require("contrib/underscore");

var debounce_saveMyFile = _.debounce(
    () =>{require("ko/views").current();},
//window.removeEventListener("editor_text_modified", debounce_saveMyFile);
window.addEventListener("editor_text_modified", debounce_saveMyFile, false);

When creating the Userscript make sure you set it’s Trigger property to “On Startup”. If you manually run it you need to uncomment that second to last line.

  • Carey