ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Live​Reload

by aik099 ST3 Trending Top 100

LiveReload plugin for Sublime Text 3 and 4: reloads the browser page when you save a file (Python 3.3 to 3.14 plugin hosts)

Details

Installs

  • Total 767K
  • Win 555K
  • Mac 130K
  • Linux 82K
Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8
Windows 5 5 17 20 13 22 10 5 13 20 10 13 7 15 1 7 11 7 21 14 25 10 8 11 13 18 13 26 9 11 22 9 16 15 17 8 6 25 11 19 14 14 24 20 28 17
Mac 1 2 5 3 10 5 4 8 0 6 2 10 6 9 2 1 7 9 4 7 8 1 1 8 9 8 9 2 2 2 5 9 12 10 9 3 2 5 10 10 9 11 3 7 3 14
Linux 0 1 1 1 3 5 1 4 2 2 3 1 0 2 3 1 5 2 1 3 2 1 3 2 2 6 4 5 1 3 3 1 5 2 2 4 3 0 1 5 4 3 3 5 3 2

Readme

Source
raw.​githubusercontent.​com

LiveReload for Sublime Text 3 and 4

A web browser page reloading plugin for the Sublime Text editor.

Installing

With Package Control:

  1. Run “Package Control: Install Package” command, find and install LiveReload plugin.
  2. Restart ST editor (if required)

Manual install

Open your Packages folder (Preferences > Browse Packages…), then:

rm -rf LiveReload
git clone https://github.com/aik099/LiveReload-sublimetext4 LiveReload

Restart Sublime Text afterwards.

Using

Enable desired plug-ins via Command Palette (Ctrl+Shift+P) add livereload.js to you html document.

<script>document.write('<script src="http://' + (location.host || '${1:localhost}').split(':')[0] + ':${2:35729}/livereload.js?snipver=1"></' + 'script>')</script>

You can also use a browser extension that implements the LiveReload protocol instead of the script tag.

Available plug-ins:

  • Compass Preprocessor, compiles .scss, .sass and refreshes page when file is compiled
  • Less Preprocessor, compiles .less and refreshes page when file is compiled
  • Sass Preprocessor, compiles .scss, .sass with the latest installed sass version and refreshes page when file is compiled
  • CoffeeScript Preprocessor, compiles .coffee and refreshes page when file is compiled
  • Simple Reload, refresh page when file is saved
  • Simple Reload with delay(400ms), wait 400ms then refresh page, when file is saved

Examples

  • Simple Reload from http GET request, reloads page on visit to http://localhost:35729/callback/simplereloadplugincallback/on_post_compile
  • Send content on change, sends file content to browser console

Sass Preprocessor usage

First, install latest version of sass “bash sudo gem install sass

Activate the plugin via the `package settings -> livereload -> plugins -> enable/disable plugins` menu

By default, the plugin save the compiled css in same dir of sources.
You can change this by creating a `sass_config.json` file near your sources:
```json
{
    "destination_dir": "../../webroot/css"
}

Plug-in api

See the PluginClass docstrings in server/PluginAPI.py and the bundled plug-ins (e.g. SimpleReloadPlugin.py) as examples.

History