Open the bundle editor (⌃⌥⌘B) and open “Text” → “Menu Actions” → “Converting / Stripping” → “Remove Trailing Spaces in Document / Selection”.
Then in the drawer put callback.document.export 
Hooray! From now on each time you’ll save a document all trailing space will be stripped!
 
