1

How can I create a Sublime Text keybind to open my Chrome web browser on html files?

On Windows I would write this:

{
"cmd": ["C:\Program Files\", "$file"]
}
1

You can do that with the View In Browser package. Once installed the default key-binding would be CTRL + ALT + V.

Note that Firefox is the default browser. To change this to Chrome (in your instance) you would need to do: Settings - User from Preferences > Package Settings > View In Browser. "The browser you wish to use to open files is set in the key named browser."

If you don't already know how to search for and install packages in Sublime Text, you may want to consider these free (after registering, which is also free) video tutorials.

0

Below is what works for Windows users, might be similar with Ubuntu users. There are two Setting in "Preferences > Package Settings > View In Browser".

  • "Settings - Default"
  • "Settings - User"

Copy and paste the content in "Settings - Default" to "Settings - User" and change whatever "browser" you want at the bottom of the pasted content! e.g.:

  • "browser": "chrome64"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.