You can come closer if you want to write your own plugin .
Plugin code:
import sublime
import sublime_plugin
class ReindentAllCommand(sublime_plugin.TextCommand):
def run(self, edit):
[v.run_command('htmlprettify') for v in sublime.active_window().views()]
Sublime Text. htmlprettify . , .
, .