Skip to content

Instantly share code, notes, and snippets.

@Zren
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zren/c31a98e0ed2651a22e92 to your computer and use it in GitHub Desktop.
Save Zren/c31a98e0ed2651a22e92 to your computer and use it in GitHub Desktop.
module.exports =
###
=== Commands
###
onStuffCommand: ->
console.log 'stuff'
###
=== PackageManager Hooks
###
activate: (state) ->
# Register onNewEditorView callback
atom.workspaceView.eachEditorView (editorView) =>
return unless editorView.getGrammar().scopeName is 'source.python'
console.log editorView, ' is a python file'
# Register Commands
atom.workspaceView.command 'example:stuff', => @onStuffCommand()
{
"name": "example",
"main": "./main.coffee",
"version": "0.0.1",
"description": "Example",
"repository": "https://github.com/Zren/example",
"license": "MIT",
"engines": {
"atom": ">0.50.0"
},
"dependencies": {},
"activationEvents": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment