Sublime Forum

Build System to run HTML in Sublime text 3

#1

I have been used Sublime text for a while. Now, I decide to upgrade it to version 3. But, I meet some problem!
When I used Sublime 2, I build system to run debug with code:
{
“cmd”: [“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”, “$file”]
}

But now, in version 3, I can’t do like that. Someone can help me??? Sorry for my bad English. English is not my first language.

1 Like

#2

Have you escaped the path properly?

{
    "cmd": ["C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "$file"]
}
1 Like

#3

If you are using HTML and Chrome is your default browser, then just right-click the open file in Sublime Text and select “Open in Browser”. It also works for Javascript and CSS.

If Chrome is not your default browser, then install the package “View in Browser”, and configure it the way you want according to the instructions. If you have the package “Sidebar Enhancements”, you can configure the F12 key to open the browser, but it is somewhat difficult.

It works for me. I like to keep things simple if I can. I don’t know build systems so I can’t help you with that.

1 Like

#4

Note that this functionality is provided by the SidebarEnhancements package.

Also note that it offers to open in a browser of your choice, optionally.

1 Like