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"]
}
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityHow 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"]
}
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.
Below is what works for Windows users, might be similar with Ubuntu users. There are two Setting in "Preferences > Package Settings > View In Browser".
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.: