Open ruthrusch opened 8 years ago
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" }, ]
I am running ST3 on Windows 10 and was experiencing the same problem.
I resolved it by doing following:
Open: Preference; Package Settings; View In Browser; Settings - User
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"
}
I made changes to paths for both chromes ( chrome & chrome canary )
I added following lines for default used when : ctrl + alt + v
"browser": "iexplore",
"browser": "chrome",
"browser": "canary"
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
The simple answer is to set Preference > Package Settings > View In Browser > Settings - User
to:
{
"browser": "chrome"
}
@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" } },
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" }