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

Live​Reload

by alepez ST3 Top 100

LiveReload plugin for SublimeText

Details

Installs

  • Total 758K
  • Win 550K
  • Mac 128K
  • Linux 81K
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 Dec 6 Dec 5 Dec 4 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
Windows 0 15 19 23 23 13 18 17 18 29 29 22 20 12 9 18 26 20 25 25 20 26 22 24 25 21 36 17 23 19 21 22 27 43 15 14 19 30 26 26 25 15 16 33 42 36
Mac 0 6 1 5 11 5 1 6 5 2 6 8 18 3 7 9 9 10 3 4 1 6 11 12 2 5 5 6 2 7 8 10 12 9 6 4 14 10 6 10 6 1 5 8 5 9
Linux 0 7 3 5 5 1 3 2 3 3 1 5 3 3 0 0 5 3 0 2 1 0 1 4 3 2 7 1 1 0 2 3 5 5 0 2 1 2 1 2 2 3 4 1 3 3

Readme

Source
raw.​githubusercontent.​com

⚠️ Repository Archived

This repository is no longer maintained and has been archived.

I originally forked this project after it was abandoned over 10 years ago, but I have not used or updated it in many years. See https://github.com/alepez/LiveReload-sublimetext3/issues/10

No further updates, bug fixes, or support will be provided.

If you are interested in continuing development, feel free to fork the repository.

Thank you for your understanding.

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