Web files that you open the browser as text or the download is because they are server-side languages. You can configure MAMP PRO, and have the root folder (documentRoot en MAMP PRO) of the server as "/". Then in the plugin that we created in ST2 located in "YourUser / Library / Application Support / Users / filenameplugin.py, and modify the variable" url ":
import sublime, sublime_plugin
url = "http://localhost:8888"
url += self.view.file_name()
if keyPressed == "1":
navegator = webbrowser.get("open -a /Applications/Google\ Chrome.app %s")
if keyPressed == "2":
navegator = webbrowser.get("open -a /Applications/Firefox.app %s")
if keyPressed == "3":
navegator = webbrowser.get("open -a /Applications/Safari.app %s")
Hope you good! If so, tell me what's wrong and help you again.
Again, sorry for my English ...