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

Live​Reload

by alepez ST3 Top 100

LiveReload plugin for SublimeText

Details

Installs

  • Total 746K
  • Win 541K
  • Mac 126K
  • Linux 80K
Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7
Windows 6 25 15 17 26 22 32 32 26 23 26 38 38 38 38 31 17 25 41 29 21 24 44 19 20 25 33 23 30 29 24 17 25 33 41 37 28 24 16 22 35 31 41 39 16 17
Mac 2 10 3 3 7 12 6 9 18 5 6 7 7 11 7 14 5 4 9 12 3 11 4 5 7 5 11 9 8 9 4 8 6 8 14 11 10 2 5 4 9 11 6 5 3 5
Linux 1 3 4 3 3 3 5 5 5 2 6 7 3 5 4 7 7 6 6 3 2 1 2 8 1 7 2 1 4 2 2 6 1 3 1 4 3 4 1 5 5 4 5 6 1 2

Readme

Source
raw.​githubusercontent.​com

LiveReload for Sublime Text 3

A web browser page reloading plugin for the Sublime Text 3 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, Linux users

cd ~/.config/sublime-text-3/Packages
rm -rf LiveReload
git clone https://github.com/alepez/LiveReload-sublimetext3 LiveReload

Manual install, OSX users

cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
rm -rf LiveReload
git clone https://github.com/alepez/LiveReload-sublimetext3 LiveReload

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 one of the extensions listed here http://livereload.com/extensions/

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 in SublimeText3 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

https://livereload-for-sublime-text.readthedocs.org/en/latest/

Thanks

The original plugin was written by Janez Troha