Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML

Text Editor

How do I integrate sublime text with Google Chrome?

2 Answers

You can create a build system that will automatically open your HTML file in Chrome. Go to Tools > Build System > New Build System. This will open a new file. Then enter the following.

For Windows:

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

For Mac:

{
    "cmd": ["open", "-a", "Google Chrome", "$file"]
}

Save it and give it a name. I named mine ChromeM (for Mac) and ChromeW (for Windows).

Now go to Tools>Build System, select your build and enter cmd+B (Mac) or ctrl+b (Windows) and Sublime Text will open your HTML page in Chrome.

Callum King
Callum King
6,470 Points

You want to open your HTML document in Google Chrome? Make sure your document/file is saved with .HTML at the end, and when selecting this document it should open in your default browser.