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

Live​Reload

by alepez ST3 Top 100

LiveReload plugin for SublimeText

Details

Installs

  • Total 740K
  • Win 536K
  • Mac 125K
  • Linux 79K
Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11
Windows 39 36 43 45 45 25 30 35 41 29 34 28 27 26 34 45 35 32 34 14 26 31 36 51 22 26 16 32 37 39 32 31 42 31 18 35 41 41 34 49 28 25 45 51 41 47
Mac 5 10 11 13 13 5 1 9 7 6 8 9 6 6 6 9 9 1 7 5 2 8 9 8 13 5 3 3 6 12 4 10 16 6 6 12 9 8 6 8 6 5 2 10 8 7
Linux 6 7 8 7 3 3 1 3 3 4 8 4 5 3 1 9 4 3 2 1 3 2 5 3 5 5 3 5 4 7 2 7 6 2 2 9 5 8 4 10 5 9 7 9 3 6

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