I’d like to register a new command with ex-mode, for example ‘ga’, that runs ‘git-plus:add’ on the given file. However, I don’t quite understand how to reference the ‘git-plus’ package given the example provided by ‘ex-mode’: The example is:
# in Atom's init.coffee atom.packages.onDidActivatePackage (pack) -> if pack.name == 'ex-mode' Ex = pack.mainModule.provideEx() Ex.registerCommand 'z', -> console.log("Zzzzzz...")
# in Atom’s init.coffee
atom.packages.onDidActivatePackage (pack) ->
if pack.name == ‘ex-mode’
Ex = pack.mainModule.provideEx()
Ex.registerCommand ‘ga’, -> ‘git-plus:add’
With the intention that when I type the sequence ‘:ga’, it will run the add command from git-plus. What would this snippet need to look like in order for it to have the desired effect?