How do I install LiveReload on Sublime Text 3? - sublimetext3

I'm using Sublime Text 3 and want to use LiveReload. I have a browser plugin for Chrome already installed. Node.js is also installed.
For Sublime Text 3 Live Reload this plugin must be installed:
https://github.com/dz0ny/LiveReload-sublimetext2
How can I install it on Windows 7? It just says something about Linux and OSX users.

Platform I used: Linux Mint 17+
I want to thank http://anthozano.fr/livereload-pour-sublime-text-3/. I was able to run live reload on sublime text 3 with the instructions in the website. However, the website is written in French (i believe - Google translate said), so I thought I could write the steps here.
First install sublime text 3 from here http://www.sublimetext.com/3 or follow your own way you prefer (I did it with Linux mint Package manager).
Secondly, install package control from here https://packagecontrol.io/installation#st3 (instruction is clearly given in the website so I did not explain it much).
Third, open package control (Shortcut : Ctrl+Shift+P) and search for Package Control: Add Repository
Now comes a region to enter URL at bottom part of sublime text 3 window. Enter https://raw.github.com/Grafikart/ST3-LiveReload/master/package.json.
Again, open package control and search for Package Control: Install Package and then search for LiveReload in the upcoming window.
Configure LiveReload Package Setting at Preferences > Package Settings > LiveReload > Setting - Default and paste this :
{
"enabled_plugins": [
"SimpleReloadPlugin",
"SimpleRefresh"
]
}
Now for your browser, install LiveReload plug in as below :
Firefox : http://download.livereload.com/2.1.0/LiveReload-2.1.0.xpi
Chrome : https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei
Safari : http://download.livereload.com/2.1.0/LiveReload-2.1.0.safariextz
Don't forget to enable the LiveReload plugin in the browser once you have installed it, so you can see the code changes reflected in the browser right away.
Note: Chrome users, for LiveReload to support file:// pages, go to chrome://extensions/, and check off Allow access to file URLs.
Snapshot taken from Safari for Mac OSX:
Enjoy, Live Reload with Sublime Text 3.
Thanks to Anthony Lozano for http://anthozano.fr/livereload-pour-sublime-text-3/.

Instead of live reload, i'd suggest browser sync, does the same thing only better and without the need for annoying browser plugins.
https://www.youtube.com/watch?v=Rv5f_v5gqw4

The plugin mentioned in the comments, LiveReload, is available for both ST2 and ST3, as indicated by the graphic on the Package Control link I just provided. It also works just fine on Windows, as the majority of its users are on that platform. The Github repository may be named "LiveReload-sublimetext2", but if you read the documentation it clearly mentions ST3 as well. The Linux and OS X instructions in the readme are for installation using git. You can also use git on Windows (if it's installed), but the author apparently didn't feel like putting explicit instructions in the README. Instead, the preferred method of installation is via Package Control, as outlined above by kind user DaV. If his comment disappears, do this:
Open Sublime Text 3.
Open the Command Palette with CtrlShiftP.
Type pci to bring up Package Control: Install Package. Hit Enter.
Type in livereload and ensure that the desired package is selected. If not, use arrow keys. Hit Enter.
Read the documentation and either add the appropriate JavaScript to your documents, or download a browser plugin (which you seem to have already done, so good for you).
Go develop.

LiveReload Sublime text3:
https://github.com/Grafikart/ST3-LiveReload
But the usage seems to have changed:
Enable desired plug-ins via Command Palette (Ctrl+Shift+P) add livereload.js to you html document.

A long time has passed. Now, for sublime text 3, the most up to date LiveReload plugin can be found here.
I encounter this problem when I tried to set up live preview of markdown files (I haven't tested on other file types). I think you may be interested.
First, you need to install sublimetext-markdown-preview. Follow instructions there on how to preview in brower.
use cmd+shift+P then Markdown Preview to show the follow commands (you will be prompted to select which parser you prefer):
Markdown Preview: Preview in Browser
Use package control to install LiveReload.
With Package Control:
Run “Package Control: Install Package” command, find and install LiveReload >plugin.
Restart ST editor (if required)
Edit the LiveReload plugin user setting under Preferences->Package Settings->LiveReload->Setting - User, add the following:
{
"enabled_plugins": [
"SimpleReloadPlugin"
]
}
Now you can use livereload as you edit your markdown files.
How to find the exact plugin name
The github repository is unclear how to set the plugin in user settings, it just give a list of supported plugins without giving their actual names. After inspecting the package (see the image below), I found the exact names for those plugins:
CompassPlugin
LESSPlugin
CoffeescriptPlugin
SimpleReloadPlugin
SimpleReloadPluginDelay

Related

Visual Studio Code DDEV and auto reload on Linux

I'm using DDEV with Visual Studio Code and I tried to configure Live Server Extension to automatically auto reload page that I'm working on in Chrome when I hit save in VSC, but it doesn't seem to work with PHP.
Is there a way to configure this to work with DDEV?
I can't seam to find any info on this issue.
Thanks
I've managed to do it another way, with guard and guard-liveguard on linux.
The workflow was:
guard installation
guard-livereload installation
Installation was not quite straightforward, but you can follow the instructions in Terminal and install what's missing if it tells you so.
Guard placed Guardfile inside of /home/user directory so I edited it to contain only this, regarding livereload pard:
guard 'livereload' do
watch(%r{.+\.(css|scss|html|php|js)$})
end
Then I installed Liveguard Google Chrome Browser Extension from here:
http://livereload.com/extensions/
Under settings I had to enable "Allow access to file URLs".
Also, you have to press liveguard extension icon in Chrome in order for it to track changes.
That's about it, now when I edit any of the file types entered in Guardfile (you can edit and add what you need, of course) it automatically reloads my Chrome window whit the edited page opened.

Python was not found but can be installed

I have just installed python3.8 and sublime text editor. I am attempting to run the python build on sublime text but I am met with "Python was not found but can be installed" error.
Both python and sublime are installed on E:\
When opening cmd prompt I can change dir and am able to run py from there without an issue.
I'm assuming that my sublime is not pointing to the correct dir but don't know how to resolve this issue.
This isn't a Sublime issue, it's a Windows 10 issue. My Windows 10 boxes don't have this feature so I'm not sure how widely spread it is, but you may want to check out this (seemingly unrelated) question "Permission Denied" trying to run Python on Windows 10.
The general gist from this post is that these new stub redirectors are supposed to direct you into installing some missing applications from the Windows App store and that user-installed versions are supposed to take priority, but depending on how the PATH is modified the system might find the stub versions before your user installed versions.
The currently accepted answer mentions:
The second part of correcting it is to type "manage app execution aliases" into the Windows search prompt and disable the store versions of Python altogether.
It's possible that you'll only need to do the second part, but on my system I made both changes and everything is back to normal now.
In the comments, there are comments from Zooba which further indicate that this is the way to go:
(Microsoft employee and CPython core developer here) You definitely only need to do the second part. There have been a couple of bugs related to upgrading apps resetting aliases which will be fixed in the next stable update, so it should be a one-time fix by then. While you're getting Insiders updates you may need to do it a couple more times.
... And launching the Store is a new feature to help people install Python - if you've added it to PATH using the regular installer it should take precedence over the new redirector, but if not you've discovered above how to disable it.
i had the same problem, so i went to the microsoft store (windos 10) and simply installed "python 3.9" and problem was gone!
sorry for bad english btw

GoSublime/GoLint caching Import Packages?

Does SublimeText 3 / GoSublime have some type of caching of Go import packages? If so, how do I clear it on demand?
I ask because while writing a custom package that is under Github source control, it works until I refactor a func or struct. Then, back at my main app (of where I import this package) it lights up like a Christmas tree when I start using the new methods.
GoSublime (or GoLint?) does not pick up the refactored func changes, and everything shows as an error. But yet, I can go to a prompt and run go build and go test just fine - the Go tool works fine.
The only thing I have been able to nail down is after about 24 hours it seems to work?
OSX 10.9
SublimeText 3
GoSublime
sublimelint **<- DO I NEED THIS? SAYS IT IS FOR HIGHLIGHTING**
SublimeLinter
SublimeLinter-contrib-GoLint
SublimeLinter-contril-GoType
(and a few other packages)
I'm a SublimeText novice; but, I believe I have everything linked up and the required packages installed. Sublime's console shows no errors in the Linters (says it find gotype and golint).
SublimeLinter: gotype activated: /Users/user1/go/bin/gotype
SublimeLinter: golint activated: /Users/user1/go/bin/golint
Things work beautifully within the package itself. It's not only my remote app. In my package, I have an "/examples" directory of tests that doesn't even pick up the changes in the root package. But again, the actual Go tool does and builds and runs all tests using the new refactored code.
It is GoSublime/GoLint that is caching the import's schema/package details. How do I clear that?
Thanks!
Coming back to answer myself this after 5 months of no answers...
#dave-cheney himself replied to a Google Groups message I posted on this subject:
https://groups.google.com/forum/#!topic/golang-nuts/N3xB6PGs3wo
Resolution:
That code, even one-off tooling for other projects, must live in your $GOPATH/src. I have changed all projects to be in the $GOPATH/src/privatedomain/etc, and updated build scripts to just deploy the executable to those other repos (and commit them). Learn to work with the tools, not fight it. :)
You need to run go install [package] on those locally developed packages for their changes to show up immediately in your current Sublime project. There is still a long day-long delay that happens though if you don't run go install that the changes are picked up in other tools/packages within Sublime. "go install" works to get around this every time so no big deal (*see next bullet point).
In Sublime, I often run go install [package] and then close/re-open the current file I am working on to pick up the changes.
Note that you don't have to be online for the go install [package] - if the package is local that is (e.g. in development). So, this was the answer to my environment since I do a lot of development offline (commuting).

LiveReload on Sublime Text 3

LiveReload seems not to be working on sublime text 3 when I download it from the package control.
I found this link (https://github.com/dz0ny/LiveReload-sublimetext2/tree/devel) on github, but there's no info on how to do it on windows (I'm on W7). Is it possible, and if so, how can I do it?
Thanks!
After a lot of trial and error I've managed to get LiveReload working on Windows 8 + Sublime Text 3!
Get the files from the devel branch with the link.
Put those files in your Packages directory: C:\Users\[YOUR USER NAME]\AppData\Roaming\Sublime Text 3\Packages
Restart Sublime Text 3
Enable the 'Simple reload' plugin. You have to repeat this step every time you restart Sublime Text. To do this:
Open the command palette with Ctrl+Shift+P
Type LiveReload
When 'enable/disable plugins' is highlighted, hit Enter.
If you have the browser plugin installed, changes to your files should now immediately be shown upon save. You may also decided to insert the JS snippet, which you can do very easily through the command palette!
I've seen comments about Windows Firewall blocking the localhost with LiveReload. I haven't really had this issue, but I disabled the Firewall the first time, just to be sure. When I re-enabled it and restarted LiveReload, Windows Firewall showed a dialog asking me to refuse or allow the plugin to make connections. So now everything works fine even with the firewall up.
It's actually pretty simple.
The answer given by kslstn and NEKEY are right, but are missing a crucial step if you are working on a local project.
So, after installing LiveReload on sublime text and installing the chrome extension and enabling both of them, make sure, in the chrome extensions page, to enable access to file URLs.
You cannot use Package Control to install LiveReload for Sublime Text 3, it doesn't work correctly.
This method works though:
Navigate to https://github.com/dz0ny/LiveReload-sublimetext2/tree/devel and download the whole devel branch by clicking on "Download ZIP".
Extract contents of the archive to: "%APPDATA%\Sublime Text 3\Packages" and open that Packages folder.
Rename "LiveReload-sublimetext2-devel" folder to "LiveReload", this is an important step to make it work (name has to match).
Restart Sublime Text 3, Ctrl+Shift+P, "LiveReload: Enable/Disable Plugins", enable SimpleReload, ENJOY the amount of time saved by not switching to browser every time you change a line of code.
P.S. You do need to get the LiveReload Google Chrome plugin, just search for it on Google Chrome Extensions Web Store.
You have to download extension for your browser I've found these:
Safari : http://download.livereload.com/2.0.9/LiveReload-2.0.9.safariextz
Firefox : http://download.livereload.com/2.0.8/LiveReload-2.0.8.xpi
Chrome : https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei
More info Here https://sublime.wbond.net/packages/LiveReload.
If I understand it correctly, it works via Sockets, so you can't do anything without browser extension.

Silent install of chrome extension using registry

For some reason I cannot get this to work. I'm following the exact procedure described here
http://developer.chrome.com/extensions/external_extensions.html#registry
And I still cannot get the extension listed. If I install it manually, using "Add Unpacked Extension" it works just fine.
Any help would be greatly appreciated
One of many writeups on this subject:
Google on Friday announced that it is changing its stance for silently
installing extensions in its browser. As of Chrome 25, external
extension deployment options on Windows will be disabled by default
and all extensions previously installed using them will be
automatically disabled.
You're much better off submitting your extension to the Chrome Web Store. If you really want to install off-store, consider inline installation.
I have been struggling with installing an addon via the registry as well. I was successful with installing an addon without adding reg keys. And using the preferences file.
I extracted my extension to Local\Google\Chrome\User Data\Default\Extensions\${ADDONID}\${VERSION}
I then added my extension directly to the Preferences file in Local\Google\Chrome\User Data\Default under the section extensions settings ${ADDONID} <-- add your extension. Compare the Preferences file to an instance you have already installed your addon. And copy that to the Preferences file along with the extension directory on a fresh install. And it should work.
This thread gave me some direction:
https://superuser.com/questions/462804/how-to-copy-an-extension-from-one-chrome-installation-to-another

Resources