3 ms·
Can you share with us how you made these bindings? Specifically open in browser? using { "keys": ["f8"], "command": "openInBrowser" }, Didn't work on my
by simonsarris 14y ago
Can you share with us how you made these bindings? Specifically open in browser? using
{ "keys": ["f8"], "command": "openInBrowser" },
Didn't work on my windows machine when I made it.
- Kilimanjaro 14y agoHere is how I did it for Safari, change accordingly. Go to Tools/BuildSystem/NewBuildSystem... Type this in: { "cmd": ["open", "-a", "Safari", "$file"], "selector": "html" } Save it in your sublime/packages/user folder as 'Open in Safari.sublime-build' That's it. It should show up in your Tools/BuildSystem and should be selected for all html files. So when you hit Cmd+B it uses that build system to just show the file in Safari. There are other ways like mapping Cmd+B directly to a python snippet like: import sublime, sublime_plugin, webbrowser class OpenBrowserCommand(sublime_plugin.TextCommand): def run(self,edit): url = self.view.file_name() webbrowser.open_new(url) but for me the first option was simpler.