Skip to content

Instantly share code, notes, and snippets.

@zzuhan
Created December 3, 2013 09:20
Show Gist options
  • Save zzuhan/7766468 to your computer and use it in GitHub Desktop.
Save zzuhan/7766468 to your computer and use it in GitHub Desktop.
sublime open_browser command
import sublime, sublime_plugin
import webbrowser
class OpenBrowserCommand(sublime_plugin.TextCommand):
def run(self, edit):
# self.view.insert(edit, 0, "Hello, World!")
url = self.view.file_name();
webbrowser.open_new(url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment