Sublime Forum

How do I test my html coding in safari with Sublime Text 2?

#1

how do I text my sublime text 2 html text document in Safari?

0 Likes

#2

If you save the file as filename.html then select open with then select Safari.(windows) or on Mac just double click the item and it should open in your default browser. Also when you save it in sublimetext check that the Syntax is set to HTML in the lower right hand corner.

0 Likes

#3

Thank you Mike. Is there a way I can set it up so I can simply press command B to see my coding in the Safari browser?

0 Likes

#4

I don’t use Macs but its pretty simple. This guide should help you out:

http://www.granneman.com/webdev/editors/sublime-text/set-up-sublime-text-to-preview-your-code-in-a-web-browser/

:slight_smile:

0 Likes

#5

This is what I use: http://livereload.com
Once set up, it reloads the browser every time you save the code.

This looks interesting too: https://packagecontrol.io/packages/Browser%20Refresh

And do upgrade to ST3 :wink:

0 Likes