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")
self.view.run_command('subl_to_atom')
elif "source.coffee" in scope:
print("Atomizr: CoffeeScript detected, trying to convert")
self.view.run_command('atom_to_subl')
elif "text.xml" in scope:
print("Atomizr: XML detected, trying to convert")
self.view.run_command('subl_snippets_to_atom')
elif "text.plain" in scope:
sublime.message_dialog("Atomizr\n\nAutomatic conversion requires a supported CoffeeScript package to be installed")
else:
sublime.message_dialog("Atomizr\n\nUnsupported scope, aborting")
# Convert Atom format
评论列表
文章目录