Ubuntu – Sublime Text 3 – Open Files in Browser

browsersublime-text

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"]
}

Best Answer

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.

Related Question