def run(self, edit):
scope = self.view.scope_name(self.view.sel()[0].a)
if "source.json" in scope or "source.sublimecompletions" in scope:
print("Atomizr: JSON detected, trying to convert to XML")
self.view.run_command('subl_json_to_xml')
elif "text.xml" in scope:
print("Atomizr: XML detected, trying to convert to JSON")
self.view.run_command('subl_xml_to_json')
else:
sublime.message_dialog("Atomizr\n\nUnsupported scope, aborting")
# Converts Sublime Text snippets into Sublime Text completions
评论列表
文章目录