Sublime Forum

LiveRefresh - F5? what is it?

#1

Hello there,

unfortunately, i am having just one Monitor right now, and i am working on my personal website. The act of switching from Editor to Browser and hitting F5 annoys the shit out of me, thats why i have written this Plugin.

LiveRefresh is a SublimeText2 Plugin which runs a WebSocket Server inside the Editor and sends a Signal to all connected Clients if you save something.
In addition to this, i have written a Google Chrome Plugin which lets you connect each single Browser-Tab to a WebSocket-Server.

This makes something like this possible:
I am developing on my main Computer and have connected it to my MacBook. The MacBook runs Google Chrome with the LiveRefresh extension and views the Website i am working on. MacBook is connected to my Computer via LAN, and the Browser-Tab viewing the Website i am Working on is connected to SublimeText2 on my main Computer. Each time i save something on my Computer, the MacBook is going to focus and refresh the Tab.

GitHub-Repository: github.com/PhilippSchaffrath/LiveRefresh

I hope you like it. Dont hesistate to ask questions.

Kindly regards
Philipp

0 Likes

#2

Looks nice.
Probably it’s a good idea to save host (or add a default host or whatever) and make the extension icon to work as a toggle button.

Dunno if would be possible, but would be helpful to work cross browser (like, let’s say, run in IE8, IE9, IE10, Chrome, Safari, Firefox and Opera). Probably it’s way complicated to do, but it’s certainly the kind of stuff i would pay to have :wink:

0 Likes

#3

The included Chrome-Extension is written for the Chrome-Api, so you have Features like active/inactive icons for different tabs, per-tab connections and stuff.
So i would have to write an extension/plugin for all of the Browsers. The Socket-Client in the extension could be replaced by socket.io which works in all browsers to a specific version. But i am definetly going to take a look at the other Browsers!

In the last couple of days, i was fighting myself a way through the chrome api, coffeescript, python and sublime-repated problems. Just need a bit rest right now^^

Default host is 127.0.0.1 and default port is 1025 (this values will be used if a field is empty). Port 1025 is the port the SublimeText Plugin is listening on (will be configurable in the future.

EDIT: And either the Connect or Disconnect button is clickable. One is disabled at a time! (Just check it out yourself)

0 Likes

#4

My suggestion is, to not reinventing a wheel like that. Try integration instead of replacement. LiveReload is a mature project which also is used by a lot of developers - and it has got ready for production use set of features, like browser extensions, etc. Just try to read about how to send some information to extension and that is it! :wink:

0 Likes

#5

I know LiveReload, but i dont like it pretty much. It has to run third party software, costs money and i am missing a lot of features.
Of course it exists for a while, but it still doesnt support features like connecting single tabs to different instances of text-editors (Projects), connecting through the internet or lan. LiveRefresh does all this, and it was fun to create. So i dont guess i wasted time. :wink:

0 Likes

#6

this is amazing

0 Likes