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