Sublime Text 3 Browser Live preview

im trying to view my work, real time preview on sublime text 3, i used browser-syn and live-mod but in today dates they seems to be working no longer… how can i make real time preview of my php code in browser…???

Can you not simply use Ctrl+s in your editor and F5 in your browser, or am I missing something?

You can try live reload which is another Sublime 3.0 package, though I should say that I just tried the browser sync and it worked.

Alternatively, maybe you should consider the browser sync npm package or even Parcel, which comes with built-in live reloading without further config.

That indeed is a possible, but for increased productivity, you likely want your changes to show up as soon as you save a file you’re working on. That way you don’t have to leave your cursor to a different window and focus out of your editor. It sounds like a tiny change, but believe me – it saves a lot of time.

1 Like

what is did was, install package installer after that simple install browser sync from package install,whenever i click lauch from browser sync menu its open chrome broswer and address open in broswer is: http://localhost:3000/, i belive it should be http://localhost/myprojects (i hvae install node.js as some one told me)…can guide me step for broswer sync it you dont mind…

It really does. We have a development version (which CSS changes don’t cause page reloads, but JS does) that goes off localhost:3000. It keeps everything local and doesn’t push files to the server, which is slower.

Then we have a localhost:5000 which refreshes for every css/js change and actually pushes files to the server with each save. The productivity increase is notable.

Sometimes when copying local files to the server I have had conflicts that prevent the server files from doing what I want then to do so prefer to find problems ASAP:

  1. develop locally using Sublime

  2. frequently refresh a local open browser page

  3. spasmodically RSYNC from a local terminal

  4. after RSYNC, refresh a server browser sandbox page

Example of using RSYNC:

rsync -avz /var/www/ci4-strict.tk/ -e ssh myrootname@123.45.67.89:/var/www/ci4-strict.tk/

Results of synchronising nearly 1,000 files:

sending incremental file list
sent 94,857 bytes received 535 bytes 12,718.93 bytes/sec
total size is 18,187,974 bytes, speedup is 190.67 milliSeconds

A complete project is synchonized in seconds to a server side Sandbox.

Edit:

RSYNC works on all platforms

thank for all helping me but i have move to brackets which give the option for live previews…as it was bit hard for me to figure out why its not working for me…

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.