Make Ex.registerAlias accessible from the outside

This commit is contained in:
jazzpi 2015-12-28 12:45:19 +01:00
parent 155ffcaa5a
commit 701f27130f
2 changed files with 3 additions and 0 deletions

View file

@ -18,6 +18,8 @@ atom.packages.onDidActivatePackage (pack) ->
if pack.name == 'ex-mode'
Ex = pack.mainModule.provideEx()
Ex.registerCommand 'z', -> console.log("Zzzzzz...")
# Register an alias - Now :W acts like :w
Ex.registerAlias 'W', 'w'
```
See `lib/ex.coffee` for some examples commands. Contributions are very welcome!

View file

@ -30,6 +30,7 @@ module.exports = ExMode =
provideEx: ->
registerCommand: Ex.registerCommand.bind(Ex)
registerAlias: Ex.registerAlias.bind(Ex)
consumeVim: (vim) ->
@vim = vim