Rad
Rad

Reputation: 963

Sublime Text 2 - How to cause LiveReload refresh when the currently edited file changes externally

Sublime Text 2 - How to cause LiveReload refresh when the currently edited file changes externally (like Visual Studio)

I installed LiveReload and when I activate it in the browser it can communicate with Sublime Text and reload the current page if the “Save" in Sublime is detected. This works fine if I am working only in Sublime Text editor.

However I also work in Visual Studio on the same set of files. I added Sublime Text as an external process to run from my Tools menu which when run will pass currently edited page and its cursor position to the Sublime Text so when Sublime Text opens that file I can edit the same file and be on the same current line as in Visual Studio (That is a nice feature of Sublime to accept cursor position as input command argument). This works fine too.

What it doesn’t work is I edit a file in Visual Studio that I have opened in Sublime text and and save it, that change is not detected as “Save" action in Sublime and I don’t see LiveReload functionality. I think the file will only be reloaded in Sublime.

Is there a way to treat a change to the currently edited file in Sublime Text from an external program as “Save” operation which in turn will trigger LiveReload in the browser?

I wouldn't want to have 2 reload solution one for sublime and for Visual Studio. I am fine to have 2 editors opened at the same time. Ideally it would be nice to have one LiveReload plugin that would cause refresh from both Visual Studio and Submlime text

Thanks,

Rad

Upvotes: 8

Views: 4692

Answers (3)

Kevin Johnson
Kevin Johnson

Reputation: 1970

In case you are working with Chrome to see the updates made in your editor reflecting your page, you may consider using the extension by the name LivePage. It works independently from any editor and should therefore fulfill your need.

Upvotes: 0

Mo.
Mo.

Reputation: 27513

There are many sublime packages are available for that in https://sublime.wbond.net

Here is one the best one with tutorial http://www.hongkiat.com/blog/sublime-text-refresh-browser/

Upvotes: 0

tr33hous
tr33hous

Reputation: 1642

I use sublime in linux and it automatically reloads. No need for a plugin. Case may be different in Windows though

Upvotes: 1

Related Questions