sublime forum

http://www.sublimetext.com/forum/viewtopic.php?f=2&t=3851

 

1.open_browser.py里的内容包括:

import sublime, sublime_plugin
import webbrowser


class OpenBrowserCommand(sublime_plugin.TextCommand):
   def run(self,edit):
      url = self.view.file_name()
      webbrowser.open_new(url)

 

2.Tools > Command Palette > "User Key bindings"

[   { "keys": ["ctrl+shift+b"], "command": "open_browser" }]

 

posted @ 2012-11-01 10:40  glelaine  阅读(121)  评论(0编辑  收藏  举报