I would like sublime to save my file on each key stroke, for live reload purposes.
The neatest action would be to autosave on each keystroke, only if the file has va
You could write a plugin that saves the file using the on_modified listener. Something like the following may work (note untested)
import sublime_plugin
class SaveOnModifiedListener(sublime_plugin.EventListener):
def on_modified(self, view):
view.run_command("save")
If you have a linter, you could validate it, and only save on clean lints. Note that with what I have posted, any edit to any file in sublime will be saved on each keystroke. You may want to add some additional checks for things like file type, if it exist on disk, etc.