You could code up a command like
https://gist.github.com/3378338 and then bind the command to a hotkey or put it into the command palette. With a few modifications you can make the command run in batch mode or go through open files / all files in the project. If you have any questions, please, let me know.