def run(self, edit, *args, **kwargs):
self.window = self.view.window()
self.selection = sublime.Selection(self.view.id())
self.settings = self.view.settings()
for region in self.view.sel():
# pygame.draw.circle
text = self.view.substr(region)
text = 'pygame.draw.circle'
if text.startswith('pygame.'):
text = text[len('pygame.'):]
module, method = text.split('.')
path = PATH_TO_PYGAME_DOC + '/' + module + '.html#' + module + '.' + method
webbrowser.open_new_tab(path)
评论列表
文章目录