Skip to content

Instantly share code, notes, and snippets.

@defuz
Created November 9, 2012 18:35
Show Gist options
  • Save defuz/4047400 to your computer and use it in GitHub Desktop.
Save defuz/4047400 to your computer and use it in GitHub Desktop.
class CompileListener(EventListener):
def on_post_save(self, view):
if isCoffee(view):
view.run_command("compile")
js_file = path.splitext(view.file_name())[0] + '.js'
for v in view.window().views():
if v.file_name() == js_file:
v.run_command("revert")
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment