Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to set Chrome as default browser. Keeps opening Firefox. #61

Open
ruthrusch opened this issue Jun 6, 2016 · 4 comments
Open

Comments

@ruthrusch
Copy link

Even though I set my default browser to Chrome, it continues to open Firefox instead. Here is what is in my View In Browser.sublime-settings file:
{
"selectedBrowser": "chrome"
}

@greg-hub
Copy link

Hi, I was having the same issue. You just need to use "open in browser" not "view in browser". When you right click on a document you can see both options.

So with my browser default set to chrome this works in ST3. If you want a hotkey i use this.

[
{ "keys": ["ctrl+alt+c"], "command": "open_in_browser" },
]

@Js-GitHub
Copy link

Js-GitHub commented Jun 30, 2016

I am running ST3 on Windows 10 and was experiencing the same problem.

I resolved it by doing following:

#1
Open:
Preference; Package Settings; View In Browser; Settings - User

#2
I cut and pasted following from the Settings - Default

{
"nt": {
"win32": {
"firefox": "C:\Program Files (x86)\Mozilla Firefox\firefox.exe -new-tab",
"iexplore": "C:\Program Files\Internet Explorer\iexplore.exe",
"chrome": "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe",
"canary": "C:\Users\sgx\AppData\Local\Google\Chrome SxS\Application\chrome.exe",
"yandex": "%Local AppData%\Yandex\YandexBrowser\browser.exe"
}
},

"browser": "iexplore",
"browser": "chrome",
"browser": "canary"

}

#3
I made changes to paths for both chromes ( chrome & chrome canary )

#4
I added following lines for default used when : ctrl + alt + v

"browser": "iexplore",
"browser": "chrome",
"browser": "canary"

#5
If I type ctrl + Alt + v it goes to canary
If I type ctrl + Alt + c it goes to chrome
If I type ctrl + Alt + f it goes to firefox
If I type ctrl + Alt + I it goes to iexplore

I couldn't find the default windows key map file I suspect it's built into view-in-browser:

sublime-view-in-browser / Default (Windows).sublime-keymap

The above file contains following settings:

[
{ "keys": [ "ctrl+alt+v" ], "command": "view_in_browser" },
{ "keys": [ "ctrl+alt+f" ], "command": "view_in_browser", "args": { "browser": "firefox" } },
{ "keys": [ "ctrl+alt+c" ], "command": "view_in_browser", "args": { "browser": "chrome" } },
{ "keys": [ "ctrl+alt+i" ], "command": "view_in_browser", "args": { "browser": "iexplore" } },
{ "keys": [ "ctrl+alt+s" ], "command": "view_in_browser", "args": { "browser": "safari" } }
]

Make sure path to chrome listed is correct and actually goes to the correct folder that contains chrome.exe file

@TrevorSayre
Copy link

The simple answer is to set Preference > Package Settings > View In Browser > Settings - User to:

{
  "browser": "chrome"
}

@thisVioletHydra
Copy link

thisVioletHydra commented Oct 16, 2017

@Js-GitHub very thank you!!1

now i set this for my CANARY chrome:
{ "nt": { "win32": { "canary": "C:/Users/{{ **NAME** }}/AppData/Local/Google/Chrome SxS/Application/chrome.exe" } }, "browser": "iexplore", "browser": "chrome", "browser": "canary", "browser": "chrome64", }
keymap:
{ "keys": ["f7"], "command": "view_in_browser", "args": { "browser": "canary" } },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants