For many years I used CodeWright, and then SlickEdit, for all my editing. Both of those had a very useful feature: Save Files on loss of focus.
As Visual Studio improved, I started using it more and more, and missed that autosave feature. So, a few years ago, I wrote an AddIn for VisualStudio 2010 that saved all changed documents when VS lost focus.
I kept that AddIn up-to-date for VS2012 and VS2013, but read recently that AddIn support would be going away, and VSPackages was the way to enhance and extend VS.
Converting the AddIn to a VSPackage was pretty straightforward, except for one problem: the autosave functionality didn’t work initially. I found that this appears to be a difference in AddIn load behavior vs. VSPackage load behavior. AddIns are initialized on load, while VSPackages are only initialized when certain conditions exist. (This is done to minimize VS startup time by preventing all the extensions from trying to load at once.)
The load behavior is controlled by attributes decorating the class that extends Package. I added the attributes for UIContext_EmptySolution and UIContext_SolutionExists, and the extension works as desired. See this post for details in installing the extension.descarregar whatsapp
(Note that you can get the same behavior in vim by adding this to your _vimrc:
‘ Save all files when gvim loses focus
au FocusLost * wa
“au” is the abbreviation for autocmd, and FocusLost is the name of the event to trigger it.
Similarly, setting autowrite saves changes when you switch buffers (:bn, for example).)