Use command() instead of on() for document events

Allows commands such as 'open-user-configuration' to
appear and be invoked from the event palette
This commit is contained in:
Kevin Sawicki
2012-12-17 17:59:34 -08:00
parent a53537df20
commit 07a5672e20

View File

@@ -23,10 +23,10 @@ class Keymap
'meta-O': 'open-unstable'
'meta-w': 'core:close'
$(document).on 'new-window', => atom.newWindow()
$(document).on 'open-user-configuration', => atom.open(atom.configFilePath)
$(document).on 'open', => atom.open()
$(document).on 'open-unstable', => atom.openUnstable()
$(document).command 'new-window', => atom.newWindow()
$(document).command 'open-user-configuration', => atom.open(atom.configFilePath)
$(document).command 'open', => atom.open()
$(document).command 'open-unstable', => atom.openUnstable()
bindKeys: (selector, bindings) ->
bindingSet = new BindingSet(selector, bindings, @bindingSets.length)