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 763K
  • Win 552K
  • Mac 129K
  • Linux 81K
Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22
Windows 10 34 25 22 18 9 0 0 0 0 0 0 0 3 14 25 19 30 26 24 19 17 16 38 16 26 30 11 20 40 35 21 15 20 11 11 9 19 30 26 22 11 14 26 22 32
Mac 2 12 7 22 18 3 0 0 0 0 0 0 0 1 4 5 20 13 7 12 12 4 8 12 19 18 8 3 8 14 9 14 9 8 3 4 3 13 6 8 15 6 13 10 14 13
Linux 0 4 3 4 6 3 0 0 0 0 0 0 0 1 5 2 3 5 8 1 2 2 1 3 8 5 7 2 2 0 1 5 4 2 2 2 3 1 5 2 3 2 4 2 4 6

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