I followed the instruction for windows 7 to setup chrome. No luck!
{
\"cmd\":[\"C:\\Program Files (x86)\\Google\\Chrome\\Application\", \"$C:\\Users\\gmu\\D
Install the Sublime View In Browser extension that, quote:
View In Browser is a Sublime Text 2 plugin that will open whatever is in your current view/tab.
Installation in using instructions in tne README.md
file.
I was having the same problem and found this post ! My problem was fixed by just typing this:
{
"cmd": ["C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "$file"]
}
Notice that double \\
solved my problem ..
And then I saved it as Chrome.sublime-build on:
C:\Users\YourUsername\AppData\Roaming\Sublime Text 2\Packages\User
preferences > key bindings-user should look like this in windows:
[
// *RIGHT* { "keys": ["f12"], "command": "open_browser" },
// *WRONG* { "keys": ["f12"], "ctrl": "open_browser" },
{ "keys": ["f12"], "command": "open_browser" },
{ "keys": ["ctrl+e"], "command": "HtmlDialect" },
{ "keys": ["/"], "command": "close_tag_on_slash" }
]
look in your packages folder for a folder called 'openbrow' then open the openbrow.py file in sublime
find the icon for the browser you want to use and goto it's properties to copy the path to it's location on your computer
then in the openbrow file your gonna paste that path where it should go.
for instance ([r'C:\path to your browser', '-new-tab', self.view.file_name()])
here's what my openbrow.py file looks like:
import sublime, sublime_plugin
import subprocess
class OpenBrowserCommand(sublime_plugin.TextCommand):
def run(self,edit):
subprocess.call([r'C:\Program Files
(x86)\Mozilla Firefox\firefox.exe','-new-tab', self.view.file_name()])
hope this helps! KCCO
In my Windows this code is working. Go to Tools > Build System > New Build System Then put the code with your browser file path.
{
"cmd": ["C:\\Program Files\\Mozilla Firefox\\firefox.exe", "$file"]
}
Please use double '\\' for '\'. Hope it will work.