In Sublime Text 2, there is a
save_on_focus_lost preference option. When set, every time you switch to another app all current files are saved. Is there a way to make BBEdit behave the same way?
BBEdit has "Attachement Point" scripts that are automatically run during different conditions. Here is a list of Attachment Points:
Here is a script that should do what you want: