sublime auto save code example
Example 1: autosave in sublime text windows 10
Windows - click Preferences > Settings - User
Add this line
{ "save_on_focus_lost": true }
Save the file
Close the file
Example 2: save on focus lost sublime
"save_on_focus_lost": true