Sublime Forum

Best way to Live Preview Code

#1

Hello

In 2016, is there an accepted way for Sublime experts to live preview html code?
Is there some kind of split-screen, text editor / browser setup that works well?

I do have Live Reload installed and working…just requires Chrome to be open.
I’m fairly new to Sublime any suggestions are welcome.

Thanks

0 Likes

#2

Please note that Sublime is a general editor, not a html one.

That being said, you could try LiveStyle (which also require chrome to be open).

Out of curiosity: why an open browser is a problem especially when you do HTML?

0 Likes

#3

Spend the time to get BrowserSync setup. It’s infinitely more powerful than Live Reload and will even sync changes to any remote devices (eg tablets and mobiles) as you code.

It takes a little more to get up and running but is worth the investment IMHO. www.BrowserSync.io

1 Like

#5

Hello,

to me the best investment is codekit instead of livereload, because it can serve a lot of purpose in any kind of project. you create you website folder at the location of your choice. you drag and drop it on Codekit. You activate it’s ability to livereload in chrome, chromium, safari, firefox or whatever…
Codekit can generate a dev link and you can preview your code on an ipad and an iphone, also android at the same time you work.

You can split view half screen on mac with sublimetext and chrome…

Edit: But of course you can work with command line inside the terminal and make the same with gulp or grunt and have a free workflow by the terminal. (if you’re on Mac or Linux)

0 Likes

#6

Why don’t let the html file your are editing to do it, aha?

<script>
	window.onload = function() {  // reload file every second
		setInterval(function() { location.reload(); } , 1000);
	};
</script>

Just add this little JavaScript snip above to your html file.
Remember to remove it when you are done :smiley:

And I just found a much simpler one on stackoverflow…
<meta http-equiv="refresh" content="1" >

2 Likes