LiveReload on Sublime Text 3 - sublimetext3

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.

Related

pgAdmin 4 - preferences settings not applied

I'm using pgAdmin 4 (v. 6.12) on Windows 10.
Since (I believe) version 6.10 I've noticed that autocomplete always shows up. I tried to change preferences settings to only show it on Ctrl + space:
But it made no difference - autocomplete is always shown.
Then I've noticed, that some other settings are not respected, for example insert bracket pairs:
This is how editor looks just after typing opening bracket:
This is very annoying. I've completely removed previous installation of pgAdmin: uninstalled it, deleted all files and folders with pgAdmin in name and did the same in Windows registry. But new installation behaves the same.
New installation was made only for my user account, not for Anyone who uses this computer option.
Like you, I was also unable to turn off autocomplete-on-type after installing 6.12.
When using the web client, I was able to log out and log back in to solve it.
UPDATE from comments: using the Windows application, Adam was able to clean session data from the registry, open the editor window, change settings, close editor window, change settings… And it started to work again.
More details...
It happened to me in Ubuntu when I first upgraded to 6.12 and restarted the server, while the client was connected. The web client appears to have held on to a session that at first seemed to work. Once I logged out and log back in, my autocomplete-on-type OFF setting was respected again.
I agree that this bug is completely frustrating. I'm not sure why anyone would want the autocomplete-on-type setting enabled, pgadmin4 is unusable with it on.

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.

How to create Windows shortcut for chrome-devtools link?

Instead of copying and pasting the link for the chrome-devtools inspector (for use with node.js) each time, is it possible to create a shortcut link to access it?
I've tried the normal way to create a shortcut and if I start the url with http://devtools/..., it opens that URL, however when the "http://devtools" is changed to "chrome-devtools://devtools" (which is required for inspector to work), the chrome shortcut just opens up the default page as if it doesn't see this url.
So using this in the target for the shortcut:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" chrome-devtools://devtools/remote/serve_file/#521e5b7e2b7cd66e4006a8a56cb9c4e5534a5ef/inspector.html?experiments=true&v8only=true&ws=localhost:9229/node
results in the url being ignored, but changing the:
"chrome-devtools://"
to
"http://"
causes the url to be used although it isn't valid since it has to begin with "chrome-devtools://".
So it looks like shortcuts only use site addresses that are not prefixed with "chrome-devtools://". I've tried putting quotes around the url, but that doesn't solve it.
Does anyone know how to make this work?
I'm switching from using node-inspector for debugging to google-chrome-devtools since node-inspector no longer works with the latest version of node.js and support seems to be dropping in favor of the new --inspect option on node.js.
Environment is Windows 10, node.js v6.3.1, Chrome version 53.0.2785.116 m

How do I install LiveReload on Sublime Text 3?

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

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