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

Live​Reload

by alepez ST3 Trending Top 100

LiveReload plugin for SublimeText

Details

Installs

  • Total 645K
  • Win 460K
  • Mac 114K
  • Linux 72K
Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 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
Windows 101 161 189 179 150 117 133 118 145 138 144 152 105 100 133 136 151 153 157 127 121 154 170 154 152 146 99 115 136 154 148 157 140 94 104 148 167 155 166 157 138 117 149 159 145 164
Mac 21 25 23 29 16 13 11 16 24 20 24 22 14 22 19 27 19 22 32 15 9 21 16 17 26 20 10 14 22 20 34 23 23 21 14 16 19 22 20 13 10 14 17 17 25 16
Linux 11 16 8 18 19 11 10 15 16 17 13 11 8 13 21 13 19 36 19 8 13 14 27 12 25 18 8 16 14 19 19 10 10 14 19 15 20 20 20 17 18 14 24 24 20 18

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