Have a read here for some ideas: http://sublimetexttips.com/formatting-html-with-sublime-text/
To not get told things you already know you will probably need to tell us the tools you have already tried that don't work the way you want so we know not to recommend this again.