Sublime Plugin that does auto-save of the current document when you stop typing. Can be used with LiveReload to remove the need to press Ctrl+S all the time.
✓ Published0🌍 Public
RRestuta
Last edited Dec 14, 2012
Created on Dec 14, 2012
This example demonstrates a Sublime Text plugin that automatically saves the active document after the user pauses typing for 800 milliseconds. Using the `sublime_plugin.EventListener` API, it tracks modifications via `on_modified` and schedules a timeout through `sublime.set_timeout` with `functools.partial`. The idle detection decrements a pending counter, and when it reaches zero, the `save` command runs, reducing the need for manual Ctrl+S. The code is sourced from a Python gist by Restuta.
AI-generated description